X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fjob_view.h;h=d58a90831e37ae075faa54f730fcc338f07e508a;hp=ee254f2a4edd5fa5fcfaaadd1eadfafb77a1db9f;hb=0a3f387f5d39da2ca38ec90a9593c1b598040dd7;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05 diff --git a/src/wx/job_view.h b/src/wx/job_view.h index ee254f2a4..d58a90831 100644 --- a/src/wx/job_view.h +++ b/src/wx/job_view.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2017 Carl Hetherington This file is part of DCP-o-matic. @@ -18,6 +18,9 @@ */ +#ifndef DCPOMATIC_JOB_VIEW_H +#define DCPOMATIC_JOB_VIEW_H + #include #include #include @@ -31,32 +34,59 @@ class wxBoxSizer; class wxGauge; class wxStaticText; class wxButton; +class wxSizer; +class wxCheckBox; class JobView : public boost::noncopyable { public: JobView (boost::shared_ptr job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table); + virtual ~JobView () {} + + virtual int insert_position () const = 0; + virtual void job_list_changed () {} + void setup (); void maybe_pulse (); + void insert (int pos); + void detach (); + + boost::shared_ptr job () const { + return _job; + } + +protected: + virtual void finished (); + + boost::shared_ptr _job; + wxFlexGridSizer* _table; + /** sizer for buttons (cancel, details, pause etc.) */ + wxBoxSizer* _buttons; + /** sizer for the guage and the message underneath it */ + wxBoxSizer* _gauge_message; private: + virtual void finish_setup (wxWindow *, wxSizer *) {} + void progress (); - void finished (); void details_clicked (wxCommandEvent &); void cancel_clicked (wxCommandEvent &); - void pause_clicked (wxCommandEvent &); + void notify_clicked (); - boost::shared_ptr _job; wxWindow* _parent; - wxBoxSizer* _gauge_message; + wxWindow* _container; wxGauge* _gauge; wxStaticText* _message; wxButton* _cancel; - wxButton* _pause; wxButton* _details; + wxCheckBox* _notify; + /** sizer for all right-hand-size controls */ + wxBoxSizer* _controls; std::string _last_message; boost::signals2::scoped_connection _progress_connection; boost::signals2::scoped_connection _finished_connection; }; + +#endif