X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fjob_view.h;h=4a602fc6229b0b82542e065c8a584ed0816c10dd;hb=9ff22e1694a53f09a84b01685b64dcb83e830365;hp=ee254f2a4edd5fa5fcfaaadd1eadfafb77a1db9f;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/wx/job_view.h b/src/wx/job_view.h index ee254f2a4..4a602fc62 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,8 +18,9 @@ */ -#include -#include +#ifndef DCPOMATIC_JOB_VIEW_H +#define DCPOMATIC_JOB_VIEW_H + #include class Job; @@ -31,32 +32,62 @@ class wxBoxSizer; class wxGauge; class wxStaticText; class wxButton; +class wxSizer; +class wxCheckBox; -class JobView : public boost::noncopyable +class JobView { public: - JobView (boost::shared_ptr job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table); + JobView (std::shared_ptr job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table); + virtual ~JobView () {} + + JobView (JobView const&) = delete; + JobView& operator= (JobView const&) = delete; + + virtual int insert_position () const = 0; + virtual void job_list_changed () {} + void setup (); void maybe_pulse (); + void insert (int pos); + void detach (); + + std::shared_ptr job () const { + return _job; + } + +protected: + virtual void finished (); + + std::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