return _external_audio_stream;
}
+
+void
+Film::make_kdms (
+ list<shared_ptr<Screen> >,
+ boost::locale::date_time from,
+ boost::locale::date_time until,
+ string directory
+ ) const
+{
+
+}
+
class Log;
class ExamineContentJob;
class ExternalAudioStream;
+class Screen;
/** @class Film
* @brief A representation of a video with sound.
void set_dci_date_today ();
+ void make_kdms (
+ std::list<boost::shared_ptr<Screen> >,
+ boost::locale::date_time from,
+ boost::locale::date_time until,
+ std::string directory
+ );
+
enum Property {
NONE,
NAME,
void jobs_make_kdms (wxCommandEvent &)
{
KDMDialog* d = new KDMDialog (this);
- d->ShowModal ();
+ if (d->ShowModal () == wxID_OK) {
+ _film->make_kdms (
+ d->screens (),
+ d->from (),
+ d->until (),
+ d->directory ()
+ );
+ }
+
d->Destroy ();
}
Config::instance()->write ();
}
+
+list<shared_ptr<Screen> >
+KDMDialog::screens () const
+{
+ list<shared_ptr<Screen> > s;
+
+ list<pair<wxTreeItemId, shared_ptr<Cinema> > > cinemas = selected_cinemas ();
+ for (list<pair<wxTreeItemId, shared_ptr<Cinema> > >::iterator i = cinemas.begin(); i != cinemas.end(); ++i) {
+ for (list<Screen>::iterator j = i->second->screens.begin(); j != i->second->screens.end(); ++j) {
+ s.push_back (*j);
+ }
+ }
+
+ list<pair<wxTreeItemId, shared_ptr<Screen> > > screens = selected_screens ();
+ for (list<pair<wxTreeItemId, shared_ptr<Screen> > >::iterator i = screens.begin(); i != screens.end(); ++i) {
+ s.push_back (i->second);
+ }
+
+ s.sort ();
+ s.uniq ();
+
+ return s;
+}
+
+boost::locale::date_time
+KDMDialog::from () const
+{
+
+}
+
+boost::locale::date_time
+KDMDialog::until () const
+{
+
+}
+
+string
+KDMDialog::directory () const
+{
+ return wx_to_std (_folder->GetPath ());
+}
public:
KDMDialog (wxWindow *);
+ std::list<boost::shared_ptr<Screen> > screens () const;
+ boost::local::date_time from () const;
+ boost::local::date_time until () const;
+ std::string directory () const;
+
private:
void add_cinema (boost::shared_ptr<Cinema>);
void add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);