-
Notifications
You must be signed in to change notification settings - Fork 37
RPPQT: QT support for RPP. Part 1: from_signal #291
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
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
676a30c
add dependency to qt
AlexInLog 6d10dea
from_event base implementation
AlexInLog 75e32a1
minor update
AlexInLog eee45ee
rename + simplify
AlexInLog 25790ef
fix find_package for qt
AlexInLog ba0995c
Tests
AlexInLog bb538d3
Enable QT in CI
AlexInLog 735c9af
fix ci
AlexInLog 56d97e5
More complex QT example
AlexInLog 773a8a8
compile
AlexInLog 163a235
QT for sanitize
AlexInLog 2758047
compile fixes
AlexInLog a91dbbe
fix compile
AlexInLog 9dd10e0
fix package compile
AlexInLog a2de5a1
Change order
AlexInLog b61aa2c
Try to fix CI
AlexInLog f580eaf
changeQT dir
AlexInLog a4828f2
Rename
AlexInLog 8fdd4fa
Update dependencies.cmake
AlexInLog 5f8341a
Update dependencies.cmake
AlexInLog d981825
Update ci.yml
AlexInLog 76c5d88
Update dependencies.cmake
AlexInLog a42f6da
Update dependencies.cmake
AlexInLog a8aa534
Update dependencies.cmake
AlexInLog a70f7c3
Update ci.yml
AlexInLog c3e88fd
Update ci.yml
AlexInLog 43cb11e
docs
AlexInLog 50fe992
minor
AlexInLog ecda9ba
Minor
AlexInLog 60827d3
Use newest doxygen
AlexInLog b6e721c
comment
AlexInLog cb85f85
Update docs
AlexInLog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| add_subdirectory(basic) | ||
| add_subdirectory(doxygen) | ||
| add_subdirectory(petri) | ||
|
|
||
| if (RPP_BUILD_SFML_CODE) | ||
| add_subdirectory(sfml) | ||
| add_subdirectory(rpp) | ||
| if(RPP_BUILD_QT_CODE) | ||
| add_subdirectory(rppqt) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| add_subdirectory(basic) | ||
| add_subdirectory(doxygen) | ||
| add_subdirectory(petri) | ||
|
|
||
| if (RPP_BUILD_SFML_CODE) | ||
| add_subdirectory(sfml) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| add_subdirectory(interactive_window) | ||
| add_subdirectory(doxygen) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| file(GLOB_RECURSE FILES "*.cpp") | ||
|
|
||
| foreach(SOURCE ${FILES}) | ||
| get_filename_component(BASE_NAME ${SOURCE} NAME_WE) | ||
| set(TARGET ${BASE_NAME}_doxygen_sample) | ||
| add_executable(${TARGET} ${SOURCE}) | ||
| target_link_libraries(${TARGET} PRIVATE rpp rppqt) | ||
| set_target_properties(${TARGET} PROPERTIES FOLDER Examples/rppqt/Doxygen) | ||
| rpp_add_qt_support_to_executable(${TARGET}) | ||
| endforeach() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #include <rpp/rpp.hpp> | ||
| #include <rppqt/rppqt.hpp> | ||
|
|
||
| #include <iostream> | ||
| #include <QApplication> | ||
| #include <QTextEdit> | ||
|
|
||
| /** | ||
| * \example from_signal.cpp | ||
| **/ | ||
|
|
||
| int main(int argc, char* argv[]) | ||
| { | ||
| QApplication app{argc, argv}; | ||
|
|
||
| //! [from_signal] | ||
| QTextEdit* text_edit = new QTextEdit(); | ||
| rppqt::source::from_signal(*text_edit, &QTextEdit::textChanged).map([&](const auto&) | ||
| { | ||
| return text_edit->toPlainText(); | ||
| }).subscribe([](const QString& text) { std::cout << "text changed: " << text.toStdString() << std::endl;}, | ||
| [](){ std::cout << "text_edit destroyed!" << std::endl; }); | ||
| text_edit->setText("123"); | ||
| text_edit->setText("temp"); | ||
| delete text_edit; | ||
| // Output: | ||
| // text changed: 123 | ||
| // text changed: temp | ||
| // text_edit destroyed! | ||
| //! [from_signal] | ||
|
|
||
| return 0; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| SET(TARGET interactive_window) | ||
| add_executable(${TARGET} | ||
| ${TARGET}.cpp | ||
| ) | ||
|
|
||
| target_link_libraries(${TARGET} PRIVATE rppqt ${RPP_QT_TARGET}::Widgets) | ||
| set_target_properties(${TARGET} PROPERTIES FOLDER Examples/rppqt) | ||
|
|
||
| rpp_add_qt_support_to_executable(${TARGET}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.