Audacity 3.2.0
CloudSyncStatusField.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 CloudSyncStatusField.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11
12#pragma once
13
14// Needed for wx/weakref
15#include <type_traits>
16#include <wx/weakref.h>
17
18#include "ClientData.h"
19#include "Observer.h"
20
21class AudacityProject;
22
23class wxRect;
24
26{
27class ProjectCloudExtension;
28class CloudStatusChangedMessage;
29
31 public ClientData::Base
32{
33public:
36
38 static const CloudSyncStatusField& Get(const AudacityProject& project);
39
40 int GetWidth() const;
41 void OnSize(const wxRect& rect);
42 bool IsVisible() const;
43
45
46private:
47 class StatusWidget;
48
49 void MarkDirty();
51
53 const StatusWidget& GetStatusWidget() const;
54
57
58 enum class State
59 {
60 Hidden,
61 Dirty,
62 Synced,
63 Failed,
66
67 int mProgress { 0 }; // Progress, 0-100
68
69 wxWeakRef<StatusWidget> mStatusWidget;
70
72}; // class CloudSyncStatusField
73} // namespace audacity::cloud::audiocom::sync
Utility ClientData::Site to register hooks into a host class that attach client data.
struct State mState
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
Holds a msgid for the translation catalog; may also bind format arguments.
void OnCloudStatusChanged(const CloudStatusChangedMessage &extension)
static CloudSyncStatusField & Get(AudacityProject &project)
enum audacity::cloud::audiocom::sync::CloudSyncStatusField::State Hidden
A convenient default parameter for class template Site.
Definition: ClientData.h:29
Definition: Dither.cpp:67