|
20 | 20 | #include "CommonFramework/VideoPipeline/VideoOverlayScopes.h" |
21 | 21 | #include "NintendoSwitch/Framework/UI/NintendoSwitch_SwitchSystemWidget.h" |
22 | 22 | #include "CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h" |
| 23 | +#include "CommonFramework/VideoPipeline/VideoSources/VideoSource_StillImage.h" |
23 | 24 | #include "ML_LabelImages.h" |
24 | 25 | #include "Pokemon/Pokemon_Strings.h" |
25 | 26 | #include "Common/Qt/Options/ConfigWidget.h" |
@@ -175,9 +176,23 @@ LabelImages_Widget::LabelImages_Widget( |
175 | 176 |
|
176 | 177 | QPushButton* button = new QPushButton("This is a button", scroll_inner); |
177 | 178 | scroll_layout->addWidget(button); |
| 179 | + connect(button, &QPushButton::clicked, this, [&instance](bool){ |
| 180 | + const VideoSourceDescriptor* videoSource = instance.m_switch_control_option.m_video.descriptor().get(); |
| 181 | + auto imageSource = dynamic_cast<const VideoSourceDescriptor_StillImage*>(videoSource); |
| 182 | + if (imageSource != nullptr){ |
| 183 | + cout << "Image source: " << imageSource->path() << endl; |
| 184 | + } |
| 185 | + }); |
178 | 186 |
|
179 | 187 | m_option_widget = instance.m_options.make_QtWidget(*scroll_inner); |
180 | 188 | scroll_layout->addWidget(&m_option_widget->widget()); |
| 189 | + |
| 190 | + const VideoSourceDescriptor* videoSource = instance.m_switch_control_option.m_video.descriptor().get(); |
| 191 | + auto imageSource = dynamic_cast<const VideoSourceDescriptor_StillImage*>(videoSource); |
| 192 | + if (imageSource != nullptr){ |
| 193 | + cout << "Image source: " << imageSource->path() << endl; |
| 194 | + } |
| 195 | + cout << "LabelImages_Widget built" << endl; |
181 | 196 | } |
182 | 197 |
|
183 | 198 |
|
|
0 commit comments