b37e348604b75f346c8b423dd6b67a4663102871 from master; tweak job view.
[dcpomatic.git] / src / wx / job_manager_view.h
index b10446cdda4f7d215df9b152e3f3ab1cbfd879e6..244299a400a7bbf411f4575738eddf53fb4a6d71 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 #include <wx/wx.h>
 
 class Job;
+class JobRecord;
 
 /** @class JobManagerView
  *  @brief Class which is a wxPanel for showing the progress of jobs.
@@ -35,18 +36,13 @@ class JobManagerView : public wxScrolledWindow
 public:
        JobManagerView (wxWindow *);
 
-       void update ();
-
 private:
-       void periodic (wxTimerEvent &);
+       void job_added (boost::weak_ptr<Job>);
+       void periodic ();
 
-       boost::shared_ptr<wxTimer> _timer;
        wxPanel* _panel;
        wxFlexGridSizer* _table;
-       struct JobRecord {
-               wxGauge* gauge;
-               wxStaticText* message;
-       };
+       boost::shared_ptr<wxTimer> _timer;
                
-       std::map<boost::shared_ptr<Job>, JobRecord> _job_records;
+       std::list<boost::shared_ptr<JobRecord> > _job_records;
 };