repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / ui / WorkStatusView.h
blob75f104dff4702fc8071ef71e090cc57287a60bac
1 /*
2 * Copyright 2017 Julian Harnath <julian.harnath@rwth-aachen.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
4 */
5 #ifndef WORK_STATUS_VIEW_H
6 #define WORK_STATUS_VIEW_H
9 #include <View.h>
11 #include <set>
13 #include "PackageInfo.h"
16 class BarberPole;
17 class BCardLayout;
18 class BMessageRunner;
19 class BStatusBar;
20 class BStringView;
23 class WorkStatusView : public BView {
24 public:
25 WorkStatusView(const char* name);
26 ~WorkStatusView();
28 void SetBusy(const BString& text);
29 void SetBusy();
30 void SetIdle();
31 void SetProgress(float value);
32 void SetText(const BString& text);
34 void PackageStatusChanged(
35 const PackageInfoRef& package);
37 private:
38 void _SetTextPendingDownloads();
39 void _SetTextDownloading(const BString& title);
41 private:
42 BStatusBar* fProgressBar;
43 BarberPole* fBarberPole;
44 BCardLayout* fProgressLayout;
45 BView* fProgressView;
46 BStringView* fStatusText;
48 BString fDownloadingPackage;
49 std::set<BString> fPendingPackages;
53 #endif // WORK_STATUS_VIEW_H