Skip to content

Commit bcce878

Browse files
committed
[QR] add guidence how to scan QR code task
1 parent de718ce commit bcce878

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

NEWS.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Version JET
2121
- Update SnailTrail Vario#2 color
2222
- NextArrowInfoBox show bearing different instead of distance
2323
- GRInstantInfoBox show average GR on comment label
24+
- Add scan QR task guidence
2425

2526
------------------------
2627
Version 7.43 - not yet released

src/Dialogs/Task/Manager/TaskActionsPanel.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ try {
120120
ShowError(std::current_exception(), _("Download"));
121121
}
122122

123+
inline void
124+
TaskActionsPanel::OnImportQrCodeClicked() noexcept
125+
{
126+
ShowMessageBox(_("You can use an Android camera app to scan QR then select XCSoar JET to import it here. Only .xctsk task is supported."),
127+
_("Import task from QR code"),
128+
MB_OK | MB_ICONINFORMATION);
129+
}
130+
123131
void
124132
TaskActionsPanel::ReClick() noexcept
125133
{
@@ -149,6 +157,10 @@ TaskActionsPanel::Prepare([[maybe_unused]] ContainerWindow &_parent,
149157
parent.SetCurrent(parent.PAGE_WEGLIDE_PUBLIC_DECLARED);
150158
});
151159

160+
AddButton(_("Import task from QR code"), [this](){
161+
OnImportQrCodeClicked();
162+
});
163+
152164
if (is_simulator())
153165
/* cannot communicate with real devices in simulator mode */
154166
SetRowEnabled(DECLARE, false);

src/Dialogs/Task/Manager/TaskActionsPanel.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TaskActionsPanel : public RowFormWidget {
3535
void OnNewTaskClicked();
3636
void OnDeclareClicked();
3737
void OnDownloadClicked() noexcept;
38+
void OnImportQrCodeClicked() noexcept;
3839

3940
/* virtual methods from class Widget */
4041
void Prepare(ContainerWindow &parent, const PixelRect &rc) noexcept override;

0 commit comments

Comments
 (0)