Move Profile widget out of desktop-widgets

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>
This commit is contained in:
Tomaz Canabrava 2015-09-03 15:56:37 -03:00 committed by Dirk Hohndel
parent 50ec7200e6
commit 1d6683f3e0
36 changed files with 32 additions and 30 deletions

View file

@ -313,6 +313,8 @@ endif()
add_subdirectory(translations) add_subdirectory(translations)
add_subdirectory(subsurface-core) add_subdirectory(subsurface-core)
add_subdirectory(qt-models) add_subdirectory(qt-models)
add_subdirectory(profile-widget)
add_subdirectory(desktop-widgets)
if(FBSUPPORT) if(FBSUPPORT)
add_definitions(-DFBSUPPORT) add_definitions(-DFBSUPPORT)
@ -338,7 +340,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lpthread) set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lpthread)
endif() endif()
add_subdirectory(desktop-widgets)
# create the executables # create the executables
if(SUBSURFACE_MOBILE) if(SUBSURFACE_MOBILE)

View file

@ -75,23 +75,6 @@ endif()
source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE}) source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE})
# the profile widget
set(SUBSURFACE_PROFILE_LIB_SRCS
profile/profilewidget2.cpp
profile/diverectitem.cpp
profile/divepixmapitem.cpp
profile/divelineitem.cpp
profile/divetextitem.cpp
profile/animationfunctions.cpp
profile/divecartesianaxis.cpp
profile/diveprofileitem.cpp
profile/diveeventitem.cpp
profile/divetooltipitem.cpp
profile/ruleritem.cpp
profile/tankitem.cpp
)
source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})
# the yearly statistics widget. # the yearly statistics widget.
set(SUBSURFACE_STATISTICS_LIB_SRCS set(SUBSURFACE_STATISTICS_LIB_SRCS
statistics/statisticswidget.cpp statistics/statisticswidget.cpp
@ -101,8 +84,6 @@ set(SUBSURFACE_STATISTICS_LIB_SRCS
) )
source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS}) source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS})
target_link_libraries(subsurface_profile ${QT_LIBRARIES})
add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS}) add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
target_link_libraries(subsurface_statistics ${QT_LIBRARIES}) target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS}) add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})

View file

@ -5,7 +5,7 @@
#include "helpers.h" #include "helpers.h"
#include "cylindermodel.h" #include "cylindermodel.h"
#include "models.h" #include "models.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "diveplannermodel.h" #include "diveplannermodel.h"
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>

View file

@ -13,7 +13,7 @@
#include "diveplannermodel.h" #include "diveplannermodel.h"
#include "divelistview.h" #include "divelistview.h"
#include "display.h" #include "display.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "diveplanner.h" #include "diveplanner.h"
#include "divesitehelpers.h" #include "divesitehelpers.h"
#include "cylindermodel.h" #include "cylindermodel.h"

View file

@ -21,7 +21,7 @@
#include "updatemanager.h" #include "updatemanager.h"
#include "planner.h" #include "planner.h"
#include "filtermodels.h" #include "filtermodels.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "globe.h" #include "globe.h"
#include "divecomputer.h" #include "divecomputer.h"
#include "maintab.h" #include "maintab.h"

View file

@ -5,7 +5,7 @@
#include "cylindermodel.h" #include "cylindermodel.h"
#include "models.h" #include "models.h"
#include "starwidget.h" #include "starwidget.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "tankinfomodel.h" #include "tankinfomodel.h"
#include "weigthsysteminfomodel.h" #include "weigthsysteminfomodel.h"
#include "weightmodel.h" #include "weightmodel.h"

View file

@ -8,6 +8,7 @@
#include <QPainter> #include <QPainter>
#include <QWebElementCollection> #include <QWebElementCollection>
#include <QWebElement> #include <QWebElement>
#include "profile-widget/profilewidget2.h"
Printer::Printer(QPaintDevice *paintDevice, print_options *printOptions, template_options *templateOptions, PrintMode printMode) Printer::Printer(QPaintDevice *paintDevice, print_options *printOptions, template_options *templateOptions, PrintMode printMode)
{ {

View file

@ -6,7 +6,6 @@
#include <QRect> #include <QRect>
#include <QPainter> #include <QPainter>
#include "profile/profilewidget2.h"
#include "printoptions.h" #include "printoptions.h"
#include "templateedit.h" #include "templateedit.h"

View file

@ -14,7 +14,7 @@
#include "libdivecomputer/parser.h" #include "libdivecomputer/parser.h"
#include "divelistview.h" #include "divelistview.h"
#include "display.h" #include "display.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "undocommands.h" #include "undocommands.h"
class MinMaxAvgWidgetPrivate { class MinMaxAvgWidgetPrivate {

View file

@ -16,7 +16,7 @@
#include <QMessageBox> #include <QMessageBox>
#include <QInputDialog> #include <QInputDialog>
#include "mainwindow.h" #include "mainwindow.h"
#include "profile/profilewidget2.h" #include "profile-widget/profilewidget2.h"
#include "pref.h" #include "pref.h"
#include "helpers.h" #include "helpers.h"
#include "ui_socialnetworksdialog.h" #include "ui_socialnetworksdialog.h"

View file

@ -0,0 +1,19 @@
# the profile widget
set(SUBSURFACE_PROFILE_LIB_SRCS
profilewidget2.cpp
diverectitem.cpp
divepixmapitem.cpp
divelineitem.cpp
divetextitem.cpp
animationfunctions.cpp
divecartesianaxis.cpp
diveprofileitem.cpp
diveeventitem.cpp
divetooltipitem.cpp
ruleritem.cpp
tankitem.cpp
)
source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})
add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS})
target_link_libraries(subsurface_profile ${QT_LIBRARIES})

View file

@ -11,7 +11,7 @@
#include "libdivecomputer/parser.h" #include "libdivecomputer/parser.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "maintab.h" #include "maintab.h"
#include "profile/profilewidget2.h" #include "profilewidget2.h"
#include "diveplanner.h" #include "diveplanner.h"
#include <QSettings> #include <QSettings>

View file

@ -23,6 +23,7 @@ set(SUBSURFACE_MODELS_LIB_SRCS
divesitepicturesmodel.cpp divesitepicturesmodel.cpp
ssrfsortfilterproxymodel.cpp ssrfsortfilterproxymodel.cpp
) )
source_group("Subsurface Models" FILES ${SUBSURFACE_MODELS}) source_group("Subsurface Models" FILES ${SUBSURFACE_MODELS})
add_library(subsurface_models STATIC ${SUBSURFACE_MODELS_LIB_SRCS}) add_library(subsurface_models STATIC ${SUBSURFACE_MODELS_LIB_SRCS})
target_link_libraries(subsurface_models ${QT_LIBRARIES}) target_link_libraries(subsurface_models ${QT_LIBRARIES})