The magic happens here: We are iterating over the plugins
and populating the main menu with all actions provided by
them. Currently we can't test this as we don't have a single
plugin. Next patch series of commits will be adding the
Facebook plugin.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also, disable Facebook temporarely since I'm removing the preferences
widget in a few commits. Facebook will have to change to use a new
way of connection that I'm still creating.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simple port of the default preferences to the new preferences structure.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Load all settings as soon as we start the preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And this actually made me find one memory leak on the old version:
We are constantly creating / leaking a new QSortFilterProxyModel
everytime a sync() is done on the settings. That's not a lot, maybe
once per time a user changes its settings... but it's still a leak.
And the code is more sanely separated this time. yey.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All functions that should control the preferences are
created.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since I'm using a dialog created by hand, I also need to
hook things by hand. the code is very simple - debug output
kept in just to make sure things are indeed working.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This Preferences dialog should be visually similar to the
old one - the main difference is how it acts on the preferences.
It's also not based on .ui files since it's a very simple widget
I prefered to mount it by hand - no more than 6 lines of c++ code.
Right now we have only one preference page on this, and nothing
is hoocked up.
I've also changed mainwindow a bit to only show this dialog for
testing purposes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is not hooked into anything - It's the bare minimum that I
need to continue creating the new preferences dialog. But take a
look at it... very simple. :)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Our preferences dialog right now is a rather huge dialog
with more than 9 subpages, and all of those pages are programmed
inside of the same class, same methods and all that - which means
that if I change something on the dialog I can break any
other thing quite easily.
The idea of this patch series is to make it harder to break
user settings and the settings dialog.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The reason for that is, even if profile widget is made with qpainter
and for that reason it should be a desktop widget, it's being used
on the mobile version because of a lack of QML plotting library that
is fast and reliable.
We discovered that it was faster just to encapsulate our Profile in
a QML class and call it directly.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we have now destkop and mobile versions, 'qt-ui' was a very
poor name choice for a folder that contains only destkop-enabled
widgets.
Also, move the graphicsview-common.h/cpp to subsurface-core because
it doesn't depend on qgraphicsview, it merely implements all the
colors that we use throughout Subsurface, and we will use colors on both
desktop and mobile versions
Same thing applies for metrics.h/cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>