2 Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef DCPOMATIC_JOB_VIEW_H
23 #define DCPOMATIC_JOB_VIEW_H
26 #include <boost/signals2.hpp>
34 class wxFlexGridSizer;
36 class wxScrolledWindow;
45 JobView (std::shared_ptr<Job> job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table);
46 virtual ~JobView () {}
48 JobView (JobView const&) = delete;
49 JobView& operator= (JobView const&) = delete;
51 virtual int insert_position () const = 0;
52 virtual void job_list_changed () {}
56 void insert (int pos);
59 std::shared_ptr<Job> job () const {
64 virtual void finished ();
66 std::shared_ptr<Job> _job;
67 wxFlexGridSizer* _table;
68 /** sizer for buttons (cancel, details, pause etc.) */
70 /** sizer for the gauge and the message underneath it */
71 wxBoxSizer* _gauge_message;
75 virtual void finish_setup (wxWindow *, wxSizer *) {}
78 void details_clicked (wxCommandEvent &);
79 void cancel_clicked (wxCommandEvent &);
80 void notify_clicked ();
85 wxStaticText* _message;
89 /** sizer for all right-hand-size controls */
90 wxBoxSizer* _controls;
91 std::string _last_message;
93 boost::signals2::scoped_connection _progress_connection;
94 boost::signals2::scoped_connection _finished_connection;