Audacity 3.2.0
CloudProjectPropertiesDialog.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 CloudProjectPropertiesDialog.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include <string>
14#include <utility>
15
16#include "wxPanelWrapper.h"
17
18#include "Observer.h"
19
20class wxTextCtrl;
21class wxChoice;
22class wxButton;
23class wxStaticText;
24enum class AudiocomTrace;
25
27{
28class ServiceConfig;
29class OAuthService;
30class UserService;
31class UserPanel;
32} // namespace audacity::cloud::audiocom
33
35{
36
38{
40 const ServiceConfig& serviceConfig, OAuthService& authService,
41 UserService& userService, const wxString& projectName, wxWindow* parent,
44
45public:
46 enum class Action
47 {
48 Cancel,
50 SaveLocally
51 };
52
53 static std::pair<Action, std::string> Show(
54 const ServiceConfig& serviceConfig, OAuthService& authService,
55 UserService& userService, const wxString& projectName, wxWindow* parent,
56 bool allowLocalSave, AudiocomTrace);
57
58private:
59 bool OnSubmit();
60 void LayoutControls();
61 void SetupEvents();
62
63 std::string GetProjectName() const;
65
67 wxTextCtrl* mProjectName {};
68
69
70 wxButton* mSaveToCloud {};
71 wxButton* mSaveLocally {};
72 wxButton* mCancel {};
73};
74} // namespace audacity::cloud::audiocom::sync
AudiocomTrace
Definition: ExportUtils.h:27
Service responsible for OAuth authentication against the audio.com service.
Definition: OAuthService.h:43
Configuration for the audio.com.
Definition: ServiceConfig.h:25
Service for providing information about the user profile.
Definition: UserService.h:28
static std::pair< Action, std::string > Show(const ServiceConfig &serviceConfig, OAuthService &authService, UserService &userService, const wxString &projectName, wxWindow *parent, bool allowLocalSave, AudiocomTrace)
CloudProjectPropertiesDialog(const ServiceConfig &serviceConfig, OAuthService &authService, UserService &userService, const wxString &projectName, wxWindow *parent, AudiocomTrace)
void SaveToCloud(AudacityProject &project, UploadMode mode, CreateSnapshotCallback snapshotCallback)