Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qml #449

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Add qml #449

wants to merge 27 commits into from

Conversation

bansan85
Copy link

@bansan85 bansan85 commented Oct 21, 2024

As I said in #429 it's hard to split every feature because I made (small) modification in lots of files so it's hard to have multiple PR that to conflict each others.

I think that it's better to convince you that every commit is fine :)

If you don't like some commits, I will remove them.

I wrote comments on almost every commit to add more context.

If you are fine with some commit, I can create another PR with these commits to reduce the size of the current PR.

I know this PR is huge :/ Don't hesitate to send me feedback or if you want I make some changes in this PR.

project(QtNodesLibrary CXX)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -188,12 +186,6 @@ if(NOT "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
)
endif()

if(QT_NODES_DEVELOPER_DEFAULTS)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not defined anywhere.

@@ -17,7 +17,7 @@ set(CALC_HEADER_FILES

add_executable(calculator
${CALC_SOURCE_FILES}
${CALC_HEAEDR_FILES}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss spelling

CMakeLists.txt Outdated
@@ -51,7 +51,7 @@ else()
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Widgets)
endif()

find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Gui OpenGL)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Gui OpenGL Quick)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QML needs Quick

@@ -0,0 +1,211 @@
#include "QmlWrapper.hpp"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapper stolen from musescore project

@@ -485,6 +485,7 @@ void DataFlowGraphModel::loadNode(QJsonObject const &nodeJson)
onOutPortDataUpdated(restoredNodeId, portIndex);
});

model->load(internalDataJson);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember why but QtNodes crashes with _models[restoredNodeId]->load(internalDataJson);.

@@ -6,3 +6,11 @@ add_executable(acquisition_viewer ${ACQ_SOURCE_FILES} ${ACQ_HEADER_FILES}
CMakeLists.txt)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a good idea to add WINDEPLOYQT_EXECUTABLE for all examples ?

@@ -162,6 +162,12 @@ void GraphicsView::centerScene()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve qml widget

@@ -1,4 +1,4 @@
get_filename_component(QtNodes_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
@PACKAGE_INIT@
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Config.cmake.in pattern from CMake documentation

@@ -8,60 +8,14 @@ Window {
height: 1000
visible: true

ChartView {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace ChartView by Button. This component is only to avoid having WidgetView at position 0, 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant