Commit 5e935c65 authored by Artem Fedoskin's avatar Artem Fedoskin

Use colors from current color scheme in KStars Lite pages, drawers and context...

Use colors from current color scheme in KStars Lite pages, drawers and context menus. Change the way INDI client is built and included in Android version
parent 7c266f16
......@@ -56,7 +56,6 @@ if(BUILD_KSTARS_LITE)
if(ANDROID)
find_package(OpenMP REQUIRED) #Needed for LibRaw
if(OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
......
......@@ -209,6 +209,8 @@ fi
# Build INDI
if [ "$build_indi" = "Y" ] || [ "$build_indi" = "y" ] || [ "$build_indi" = "Yes" ] || [ "$build_indi" = "yes" ]
then
cd $indi_location/indi/
git pull
mkdir $indi_location/indi/build-android -p
cd $indi_location/indi/build-android
rm CMakeCache.txt
......@@ -224,19 +226,19 @@ then
rm CMakeCache.txt
make clean
cd "${kstars_DIR}/build_kstarslite/android_libs/${ANDROID_ARCHITECTURE}"
mv libindi.a _libindi.a
# Combine libindi and liblibnova
ar -M <<EOM
CREATE libindi.a
CREATE libindiclientandroid.a
ADDLIB liblibnova.a
ADDLIB _libindi.a
ADDLIB libindiclientqt.a
ADDLIB libindi.a
SAVE
END
EOM
ranlib libindi.a
rm _libindi.a
ranlib libindiclientandroid.a
rm libindiclientqt.a
rm libindi.a
fi
#Build LibRAW
......@@ -261,7 +263,7 @@ make clean
rm -rf "${build_dir}/export"
mkdir "${build_dir}/export" -p
cmake "${kstars_DIR}" -DCMAKE_TOOLCHAIN_FILE="${kstars_DIR}/build_kstarslite/android_libs_src/AndroidToolchain.cmake" \
ccmake "${kstars_DIR}" -DCMAKE_TOOLCHAIN_FILE="${kstars_DIR}/build_kstarslite/android_libs_src/AndroidToolchain.cmake" \
-DANDROID_ARCHITECTURE=${ANDROID_ARCHITECTURE} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=${qt_android_libs} \
......
......@@ -29,7 +29,8 @@ else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES)
find_path(CFITSIO_INCLUDE_DIR fitsio.h
if(ANDROID)
${CMAKE_SOURCE_DIR}/android_lib/
${CMAKE_SOURCE_DIR}/build_kstarslite/include
NO_DEFAULT_PATH
elseif(ANDROID)
${PC_CFITSIO_INCLUDE_DIRS}
${_obIncDir}
......@@ -40,7 +41,7 @@ else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES)
find_library(CFITSIO_LIBRARIES NAMES cfitsio libcfitsio
PATHS
if(ANDROID)
${CMAKE_SOURCE_DIR}/android_lib
${CMAKE_SOURCE_DIR}/build_kstarslite/android_libs/${ANDROID_ARCHITECTURE}
else(ANDROID)
${PC_CFITSIO_INCLUDE_DIRS}
${_obIncDir}
......
......@@ -42,15 +42,23 @@ macro(_INDI_check_version)
endif(NOT INDI_VERSION_OK)
endmacro(_INDI_check_version)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
if (INDI_INCLUDE_DIR)
# in cache already
_INDI_check_version()
set(INDI_FOUND ${INDI_VERSION_OK})
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_CLIENT_LIBRARIES}, ${INDI_INCLUDE_DIR}")
else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
if(ANDROID)
if(INDI_CLIENT_ANDROID_LIBRARIES)
set(INDI_FOUND ${INDI_VERSION_OK})
message(STATUS "Found INDI: ${INDI_CLIENT_ANDROID_LIBRARIES}")
endif(INDI_CLIENT_ANDROID_LIBRARIES)
else(ANDROID)
if(INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
set(INDI_FOUND ${INDI_VERSION_OK})
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_CLIENT_LIBRARIES}, ${INDI_INCLUDE_DIR}")
endif(INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
endif(ANDROID)
endif(INDI_INCLUDE_DIR)
if(NOT INDI_FOUND)
if (NOT WIN32 AND NOT ANDROID)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
......@@ -68,13 +76,12 @@ else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
if (INDI_INCLUDE_DIR)
_INDI_check_version()
if(ANDROID)
find_library(INDI_CLIENT_ANDROID_LIBRARIES NAMES indiclientandroid
PATHS
${CMAKE_SOURCE_DIR}/android_lib
)
else(ANDROID)
if(ANDROID)
find_library(INDI_CLIENT_ANDROID_LIBRARIES NAMES indiclientandroid
PATHS
${CMAKE_SOURCE_DIR}/build_kstarslite/android_libs/${ANDROID_ARCHITECTURE}/
)
else(ANDROID)
find_library(INDI_LIBRARIES NAMES indi
PATHS
${PC_INDI_LIBRARY_DIRS}
......@@ -91,20 +98,19 @@ if (INDI_INCLUDE_DIR)
find_library(INDI_CLIENT_QT_LIBRARIES NAMES indiclientqt
PATHS
${PC_INDI_LIBRARY_DIRS}
${_obLinkDir}
${GNUWIN32_DIR}/lib
${PC_INDI_LIBRARY_DIRS}
${_obLinkDir}
${GNUWIN32_DIR}/lib
)
endif(ANDROID)
endif(ANDROID)
endif(INDI_INCLUDE_DIR)
if(ANDROID)
if(INDI_CLIENT_ANDROID_LIBRARIES)
if(INDI_INCLUDE_DIR AND INDI_CLIENT_ANDROID_LIBRARIES)
set(INDI_FOUND TRUE)
else(INDI_CLIENT_ANDROID_LIBRARIES)
else()
set(INDI_FOUND FALSE)
endif(INDI_CLIENT_ANDROID_LIBRARIES)
endif()
else(ANDROID)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES) AND INDI_VERSION_OK)
# If INDI is found we need to make sure on WIN32 we have INDI Client Qt backend otherwise we can't use INDI
......@@ -124,18 +130,18 @@ endif(ANDROID)
if (INDI_FOUND)
if (NOT INDI_FIND_QUIETLY)
if(ANDROID)
message(STATUS "Found INDI Android Client: ${INDI_CLIENT_ANDROID_LIBRARIES}")
else(ANDROID)
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_INCLUDE_DIR}")
if (INDI_CLIENT_LIBRARIES)
message(STATUS "Found INDI Client Library: ${INDI_CLIENT_LIBRARIES}")
endif (INDI_CLIENT_LIBRARIES)
if (INDI_CLIENT_QT_LIBRARIES)
message(STATUS "Found INDI Qt5 Client Library: ${INDI_CLIENT_QT_LIBRARIES}")
endif (INDI_CLIENT_QT_LIBRARIES)
endif(ANDROID)
if(ANDROID)
message(STATUS "Found INDI Android Client: ${INDI_CLIENT_ANDROID_LIBRARIES}")
else(ANDROID)
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_INCLUDE_DIR}")
if (INDI_CLIENT_LIBRARIES)
message(STATUS "Found INDI Client Library: ${INDI_CLIENT_LIBRARIES}")
endif (INDI_CLIENT_LIBRARIES)
if (INDI_CLIENT_QT_LIBRARIES)
message(STATUS "Found INDI Qt5 Client Library: ${INDI_CLIENT_QT_LIBRARIES}")
endif (INDI_CLIENT_QT_LIBRARIES)
endif(ANDROID)
endif (NOT INDI_FIND_QUIETLY)
else (INDI_FOUND)
if (INDI_FIND_REQUIRED)
......@@ -143,10 +149,9 @@ endif(ANDROID)
endif (INDI_FIND_REQUIRED)
endif (INDI_FOUND)
if(ANDROID)
mark_as_advanced(INDI_INCLUDE_DIR INDI_CLIENT_ANDROID_LIBRARIES)
else(ANDROID)
mark_as_advanced(INDI_INCLUDE_DIR INDI_LIBRARIES INDI_CLIENT_LIBRARIES INDI_CLIENT_QT_LIBRARIES)
endif(ANDROID)
endif (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
if(ANDROID)
mark_as_advanced(INDI_INCLUDE_DIR INDI_CLIENT_ANDROID_LIBRARIES)
else(ANDROID)
mark_as_advanced(INDI_INCLUDE_DIR INDI_LIBRARIES INDI_CLIENT_LIBRARIES INDI_CLIENT_QT_LIBRARIES)
endif(ANDROID)
endif(NOT INDI_FOUND)
......@@ -21,7 +21,7 @@ else (NOVA_INCLUDE_DIR AND NOVA_LIBRARIES)
find_path(NOVA_INCLUDE_DIR libnova.h
if(ANDROID)
${CMAKE_SOURCE_DIR}/android_lib/include
${CMAKE_SOURCE_DIR}/build_kstarslite/include
endif(ANDROID)
PATH_SUFFIXES libnova
${_obIncDir}
......@@ -31,7 +31,7 @@ else (NOVA_INCLUDE_DIR AND NOVA_LIBRARIES)
find_library(NOVA_LIBRARIES NAMES nova libnova
PATHS
if(ANDROID)
${CMAKE_SOURCE_DIR}/android_lib
${CMAKE_SOURCE_DIR}/build_kstarslite/android_libs/${ANDROID_ARCHITECTURE}/
else(ANDROID)
${_obLinkDir}
${GNUWIN32_DIR}/lib
......
......@@ -54,7 +54,7 @@ if(NOT BUILD_KSTARS_LITE)
indi/streamform.ui
fitsviewer/fitshistogramui.ui
)
include_directories(${CFITSIO_INCLUDE_DIR})
include_directories(${})
endif(CFITSIO_FOUND)
endif(NOT BUILD_KSTARS_LITE)
......@@ -66,7 +66,7 @@ if (INDI_FOUND)
fitsviewer/bayer.c
)
if(ANDROID)
include_directories(${kstars_SOURCE_DIR}/android_lib/include)
include_directories(${kstars_SOURCE_DIR}/build_kstarslite/include)
else()
#if it is not Android we need only CFITSIO
include_directories(${CFITSIO_INCLUDE_DIR})
......@@ -724,13 +724,18 @@ if(BUILD_KSTARS_LITE)
kstarslite/qml/modules/BottomMenu.qml
kstarslite/qml/modules/KSPage.qml
kstarslite/qml/modules/KSListView.qml
kstarslite/qml/modules/KSLabel.qml
kstarslite/qml/modules/KSText.qml
kstarslite/qml/modules/KSTabButton.qml
kstarslite/qml/modules/KSTab.qml
kstarslite/qml/modules/KSTextField.qml
kstarslite/qml/modules/KSButton.qml
kstarslite/qml/modules/TopMenu.qml
kstarslite/qml/modules/helpers/TopMenuButton.qml
kstarslite/qml/modules/helpers/BottomMenuButton.qml
kstarslite/qml/modules/Splash.qml
kstarslite/qml/modules/helpers/TimeSpinBox.qml
kstarslite/qml/modules/TimePage.qml
kstarslite/qml/modules/KSTab.qml
#Popups
kstarslite/qml/modules/popups/ProjectionsPopup.qml
kstarslite/qml/modules/popups/FOVPopup.qml
......@@ -868,7 +873,7 @@ if(BUILD_KSTARS_LITE)
if(ANDROID)
#RAWExtractor is needed for converting RAW photos to JPEG in INDI Lite
add_library(RAWExtractor SHARED IMPORTED)
set_property(TARGET RAWExtractor PROPERTY IMPORTED_LOCATION ${kstars_SOURCE_DIR}/android_lib/libRAWExtractor.so)
set_property(TARGET RAWExtractor PROPERTY IMPORTED_LOCATION ${kstars_SOURCE_DIR}/build_kstarslite/android_libs/${ANDROID_ARCHITECTURE}/libRAWExtractor.so)
target_link_libraries(KStarsLib RAWExtractor)
endif(ANDROID)
endif(INDI_FOUND)
......@@ -904,31 +909,30 @@ endif(CFITSIO_FOUND)
if(INDI_FOUND)
if(BUILD_KSTARS_LITE)
find_package(Nova REQUIRED)
target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} ${NOVA_LIBRARIES})
# find_package(Nova REQUIRED)
# target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} ${NOVA_LIBRARIES})
target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} )
else(BUILD_KSTARS_LITE)
target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} KF5::Notifications)
endif(BUILD_KSTARS_LITE)
if(ANDROID)
if(WIN32 OR ANDROID)
add_definitions(-DUSE_QT5_INDI)
target_link_libraries(KStarsLib ${INDI_CLIENT_ANDROID_LIBRARIES})
else(ANDROID)
if(WIN32)
add_definitions(-DUSE_QT5_INDI)
find_package(Nova REQUIRED)
find_package(Nova REQUIRED)
if(ANDROID)
target_link_libraries(KStarsLib ${NOVA_LIBRARIES} ${INDI_CLIENT_ANDROID_LIBRARIES})
else(ANDROID)
target_link_libraries(KStarsLib ${NOVA_LIBRARIES} ${INDI_LIBRARIES} ${INDI_CLIENT_QT_LIBRARIES})
else(WIN32)
# If INDI Qt5 Client is found, use it.
if (INDI_CLIENT_QT_LIBRARIES)
add_definitions(-DUSE_QT5_INDI)
target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_QT_LIBRARIES} z)
else(INDI_CLIENT_QT_LIBRARIES)
target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_LIBRARIES} z)
endif(INDI_CLIENT_QT_LIBRARIES)
endif(WIN32)
endif(ANDROID)
endif(ANDROID)
else(WIN32 OR ANDROID)
# If INDI Qt5 Client is found, use it.
if (INDI_CLIENT_QT_LIBRARIES)
add_definitions(-DUSE_QT5_INDI)
target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_QT_LIBRARIES} z)
else(INDI_CLIENT_QT_LIBRARIES)
target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_LIBRARIES} z)
endif(INDI_CLIENT_QT_LIBRARIES)
endif(WIN32 OR ANDROID)
endif(INDI_FOUND)
......
......@@ -38,7 +38,7 @@
const char *libindi_strings_context = "string from libindi, used in the config dialog";
#ifdef Q_OS_ANDROID
#include "../../android_lib/include/libraw/libraw.h"
#include "libraw/libraw.h"
#endif
DeviceInfoLite::DeviceInfoLite(INDI::BaseDevice *dev)
......
......@@ -14,6 +14,11 @@ install( FILES modules/BottomMenu.qml
modules/KSListView.qml
modules/SkyMapLiteWrapper.qml
modules/TimePage.qml
modules/KSLabel.qml
modules/KSTabButton.qml
modules/KSText.qml
modules/KSTextField.qml
modules/KSButton.qml
DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/modules )
install( FILES dialogs/FindDialog.qml
......
......@@ -31,16 +31,20 @@ KSPage {
left: parent.left
right: parent.right
}
background: Rectangle {
anchors.fill: parent
color: num.sysPalette.base
}
TabButton {
KSTabButton {
text: xi18n("General")
}
TabButton {
KSTabButton {
text: xi18n("Position")
}
TabButton {
KSTabButton {
Component.onCompleted: {
var oldParent = parent
parent = Qt.binding(function() { return DetailDialogLite.isLinksOn ? oldParent : null })
......@@ -49,7 +53,7 @@ KSPage {
text: xi18n("Links")
}
TabButton {
KSTabButton {
Component.onCompleted: {
var oldParent = parent
parent = Qt.binding(function() { return DetailDialogLite.isLogOn ? oldParent : null })
......@@ -74,6 +78,11 @@ KSPage {
Pane {
clip: true
background: Rectangle {
anchors.fill: parent
color: num.sysPalette.base
}
Flickable {
anchors.fill: parent
ScrollBar.vertical: ScrollBar { }
......@@ -86,7 +95,7 @@ KSPage {
width: parent.width
spacing: 15
Text {
KSText {
text: DetailDialogLite.name
font.pointSize: 16
width: parent.width
......@@ -99,7 +108,7 @@ KSPage {
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
KSText {
text: DetailDialogLite.typeInConstellation
anchors.horizontalCenter: parent.horizontalCenter
font.pointSize: 12
......@@ -212,6 +221,11 @@ KSPage {
Pane {
clip: true
background: Rectangle {
anchors.fill: parent
color: num.sysPalette.base
}
Flickable {
anchors.fill: parent
ScrollBar.vertical: ScrollBar { }
......@@ -224,7 +238,7 @@ KSPage {
width: parent.width
spacing: 15
Text {
KSText {
text: xi18n("Coordinates")
font {
pointSize: 16
......@@ -272,7 +286,7 @@ KSPage {
value: DetailDialogLite.airmass
}
Text {
KSText {
text: xi18n("Rise/Set/Transit")
font {
pointSize: 16
......@@ -318,6 +332,11 @@ KSPage {
clip: true
id: links
background: Rectangle {
anchors.fill: parent
color: num.sysPalette.base
}
GridLayout {
id: linkCol
rowSpacing: 15
......@@ -339,7 +358,7 @@ KSPage {
spacing: 10
Text {
KSText {
id: infoLabel
text: xi18n("Information Links")
......@@ -375,7 +394,7 @@ KSPage {
spacing: 10
Text {
KSText {
id: imgLabel
text: xi18n("Image Links")
......@@ -419,6 +438,11 @@ KSPage {
parent: DetailDialogLite.isLogOn ? detailsSwipeView : null
clip: true
background: Rectangle {
anchors.fill: parent
color: num.sysPalette.base
}
Flickable {
anchors.fill: parent
ScrollBar.vertical: ScrollBar { }
......@@ -431,7 +455,7 @@ KSPage {
width: parent.width
spacing: 15
Text {
KSText {
text: xi18n("Log")
font {
pointSize: 16
......
......@@ -40,10 +40,10 @@ KSPage {
left: parent.left
right: parent.right
}
Label {
KSLabel {
text: xi18n("Filter by name: ")
}
TextField {
KSTextField {
id: searchQuery
Layout.fillWidth: true
onTextChanged: {
......@@ -57,7 +57,7 @@ KSPage {
left: parent.left
right: parent.right
}
Label {
KSLabel {
text: "Filter by type: "
}
......
......@@ -43,11 +43,11 @@ KSPage {
right: parent.right
}
Label {
KSLabel {
text: xi18n("Current Location: ")
}
Label {
KSLabel {
text: LocationDialogLite.currentLocation
}
}
......@@ -67,10 +67,10 @@ KSPage {
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Label {
KSLabel {
text: xi18n("City filter: ")
}
TextField {
KSTextField {
id: cityFilter
Layout.fillWidth: true
onTextChanged: {
......@@ -82,11 +82,11 @@ KSPage {
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Label {
KSLabel {
text: xi18n("Province filter: ")
}
TextField {
KSTextField {
id: provinceFilter
Layout.fillWidth: true
onTextChanged: {
......@@ -98,10 +98,10 @@ KSPage {
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Label {
KSLabel {
text: xi18n("Country filter: ")
}
TextField {
KSTextField {
id: countryFilter
Layout.fillWidth: true
onTextChanged: {
......
......@@ -70,20 +70,20 @@ KSPage {
}
}
Label {
KSLabel {
text: xi18n("Description")
}
TextField {
KSTextField {
id: descField
Layout.fillWidth: true
}
Label {
KSLabel {
text: xi18n("URL")
}
TextField {
KSTextField {
id: urlField
Layout.fillWidth: true
}
......
......@@ -10,6 +10,7 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import "../../modules"
Column {
property string label
......@@ -19,7 +20,7 @@ Column {
width: parent.width
Label {
KSLabel {
text: label
font.pointSize: 13
}
......@@ -30,7 +31,7 @@ Column {
color: "grey"
}
Label {
KSLabel {
font.pointSize: 11
text: value
}
......
......@@ -128,11 +128,11 @@ KSPage {
Layout.maximumWidth: window.isPortrait ? parent.width : parent.width/2
RowLayout {
Label {
KSLabel {
text: xi18n("City: ")
}
TextField {
KSTextField {
id: cityField
Layout.fillWidth: true
onTextChanged: fieldsChanged = true
......@@ -141,11 +141,11 @@ KSPage {
}
RowLayout {
Label {
KSLabel {
text: xi18n("Province: ")
}
TextField {
KSTextField {
id: provinceField
Layout.fillWidth: true
onTextChanged: fieldsChanged = true
......@@ -154,11 +154,11 @@ KSPage {
}
RowLayout {
Label {
KSLabel {
text: xi18n("Country: ")
}
TextField {
KSTextField {