CARDS 2.4.121
Package manager for the NuTyX GNU/Linux distribution
progressbox.h
1 /*
2  * progressbox.h
3  *
4  * Copyright 2017 Gianni Peschiutta <artemia@nutyx.org>
5  * Copyright 2017 - 2020 Thierry Nuttens <tnut@nutyx.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20  * MA 02110-1301, USA.
21  *
22  *
23  */
24 
25 #ifndef PROGRESSBOX_H
26 #define PROGRESSBOX_H
27 
28 #include <FL/Fl.H>
29 #include <FL/Fl_Double_Window.H>
30 #include <FL/Fl_Progress.H>
31 #include "cards_wrapper.h"
32 
33 using namespace cards;
34 
35 class ProgressBox : public Fl_Double_Window, public CEventHandler, public FileDownloadEvent
36 {
37 public:
38  ProgressBox (CW_ACTIONS action);
39  ~ProgressBox ();
40 protected:
41  void OnDoJobListFinished (const CEH_RC rc);
42  void OnSyncFinished(const CEH_RC rc);
43  void OnProgressInfo(int percent);
44  void OnFileDownloadProgressInfo(FileDownloadState state);
45 static void Callback(Fl_Widget*,void* pInstance);
46 private:
47  Fl_Progress* _jobProgress;
48  Fl_Progress* _fileProgress;
49  CWrapper* _cards;
50 };
51 
52 #endif
FileDownloadEvent
File Download Event class.
Definition: file_download.h:65
cards::CWrapper
Definition: cards_wrapper.h:60
cards::CEventHandler
Definition: cards_event_handler.h:63
FileDownloadState
File Download State class.
Definition: file_download.h:46
ProgressBox
Definition: progressbox.h:36