Skip to content

Commit

Permalink
remove a few imports and deprecated things ... now we can at least co…
Browse files Browse the repository at this point in the history
…mpile and run on QT 6
  • Loading branch information
Consti10 committed Feb 26, 2024
1 parent 92b7fd5 commit 32e190c
Show file tree
Hide file tree
Showing 140 changed files with 200 additions and 360 deletions.
26 changes: 19 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.16)

project(QOpenHDProject VERSION 0.1 LANGUAGES CXX)
project(QOpenHDProject VERSION 0.1 LANGUAGES C CXX)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down Expand Up @@ -73,6 +75,7 @@ qt_add_executable(QOpenHDApp
app/videostreaming/vscommon/decodingstatistcs.h
##
lib/geographiclib-c-2.0/src/geodesic.c
lib/geographiclib-c-2.0/src/geodesic.h
##
##
##
Expand All @@ -90,13 +93,22 @@ target_include_directories(QOpenHDApp PUBLIC app/telemetry/util)

target_include_directories(QOpenHDApp PUBLIC app/videostreaming/vscommon)
target_include_directories(QOpenHDApp PUBLIC lib)
target_include_directories(QOpenHDApp PUBLIC lib/geographiclib-c-2.0/src)

qt_add_qml_module(QOpenHDApp
URI QOpenHD
VERSION 1.0
QML_FILES
qml/MainX.qml
)
#qt_add_qml_module(QOpenHDApp
# URI hello
# VERSION 1.0
# QML_FILES
# qml/main.qml
# qml/ui/AnyParamBusyIndicator.qml
# qml/ui/HUDOverlayGrid.qml
# qml/ui/elements/
# qml/ui/sidebar/
# qml/ui/widgets/
#)
#qt6_add_resources(qml_QRC
# PREFIX "/"
# qml/qml.qrc)


target_link_libraries(QOpenHDApp
Expand Down
8 changes: 7 additions & 1 deletion app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,13 @@ int main(int argc, char *argv[]) {
);

// TODO QT 6
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
//engine.load(QUrl(QLatin1String("qrc:/main.qml")));
//const QUrl url("qrc:/qt/qml/hello/qml/main.qml");
QCoreApplication::addLibraryPath("./");
//const QUrl url(QStringLiteral("qrc:/qt/qml/main.qml"));
//const QUrl url(QStringLiteral("qrc:/qml/main.qml"));
const QUrl url(QStringLiteral("qrc:/main.qml"));
engine.load(url);
//engine.loadFromModule("QOpenHD", "qrc:/main.qml");
//engine.loadFromModule("QOpenHDApp","qrc:/main.qml");
//engine.load("qml/main.qml");
Expand Down
13 changes: 8 additions & 5 deletions app/telemetry/tutil/geodesi_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
#define GEODESI_HELPER_H

//#include <geographiclib-c-2.0/src/geodesic.h>
#include "lib/geographiclib-c-2.0/src/geodesic.h"
extern "C" {
//#include "lib/geographiclib-c-2.0/src/geodesic.h"
//#include "geodesi.h"
}

// return: distance in m between 2 points
static double distance_between(double lat1,double lon1,double lat2,double lon2){
/*static double distance_between(double lat1,double lon1,double lat2,double lon2){
double s12;
//double azi1;
//double azi2;
Expand All @@ -16,10 +19,10 @@ static double distance_between(double lat1,double lon1,double lat2,double lon2){
geod_init(&geod,a,f);
geod_inverse(&geod,lat1,lon1,lat2,lon2,&s12,0,0); //&azi1,&azi2
return s12;
}
}*/

/*static double distance_between(double lat1,double lon1,double lat2,double lon2){
static double distance_between(double lat1,double lon1,double lat2,double lon2){
return 0;
}*/
}

#endif // GEODESI_HELPER_H
171 changes: 0 additions & 171 deletions qml/MainX.qml

This file was deleted.

6 changes: 3 additions & 3 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ ApplicationWindow {
}
}


ColorPicker {
// TODO QT 6
/*ColorPicker {
id: colorPicker
height: 264
width: 380
z: 15.0
anchors.centerIn: parent
}
}*/

// UI areas

Expand Down
4 changes: 2 additions & 2 deletions qml/ui/AnyParamBusyIndicator.qml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.0
import QtGraphicalEffects 1.12

import Qt.labs.settings 1.0

import OpenHD 1.0
Expand Down
7 changes: 3 additions & 4 deletions qml/ui/HUDOverlayGrid.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.12

import OpenHD 1.0

Expand Down Expand Up @@ -494,12 +492,13 @@ Item {
}

// Extra element - allows customizing the OSD color(s) and more
OSDCustomizer {
// TODO QT 6
/*OSDCustomizer {
id: osdCustomizer
anchors.centerIn: parent
visible: false
z: 5.0
}
}*/
TapHandler {
acceptedButtons: Qt.AllButtons
onTapped: {
Expand Down
1 change: 0 additions & 1 deletion qml/ui/configpopup/ConfigPopup.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Dialogs 1.3
import QtQuick.Layouts 1.12
import QtQuick.Window 2.12
import Qt.labs.settings 1.0
Expand Down
1 change: 0 additions & 1 deletion qml/ui/configpopup/ConfigPopupSidebarButton.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Dialogs 1.3
import QtQuick.Layouts 1.12
import QtQuick.Window 2.12
import Qt.labs.settings 1.0
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/connect/ConnectPanel.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Dialogs 1.0

import QtQuick.Controls.Material 2.12

import Qt.labs.settings 1.0
Expand Down
9 changes: 5 additions & 4 deletions qml/ui/configpopup/connect/PaneConnectionMode.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Dialogs 1.0

import QtQuick.Controls.Material 2.12

import Qt.labs.settings 1.0
Expand Down Expand Up @@ -235,9 +235,10 @@ Rectangle{
TextField {
Layout.alignment: Qt.AlignCenter
id: textFieldip
validator: RegExpValidator {
regExp: /^((?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){0,3}(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/
}
// TODO QT 6
//validator: RegExpValidator {
// regExp: /^((?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){0,3}(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/
//}
inputMethodHints: Qt.ImhFormattedNumbersOnly
text: settings.qopenhd_mavlink_connection_manual_tcp_ip
}
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/dev/AppDeveloperStatsPanel.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.12


import Qt.labs.settings 1.0

Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/dev/QOpenHDServiceDialoque.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Dialogs 1.1

import QtQuick.Controls.Material 2.12

import Qt.labs.settings 1.0
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/log/LogMessagesStatusView.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Dialogs 1.0

import QtQuick.Controls.Material 2.12

import Qt.labs.settings 1.0
Expand Down
Loading

0 comments on commit 32e190c

Please sign in to comment.