X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fscreens_panel.h;h=80a7b38433ba8a32514a3a47a011198859fab975;hb=2ecb69fa967dacce23336cab1c526d133ea33321;hp=f19aef68000ac08b34526945ee1851c18fe7f9c8;hpb=b9a1ad3df5f9d85fb7439efd93fede72b9b078af;p=dcpomatic.git diff --git a/src/wx/screens_panel.h b/src/wx/screens_panel.h index f19aef680..80a7b3843 100644 --- a/src/wx/screens_panel.h +++ b/src/wx/screens_panel.h @@ -19,12 +19,14 @@ */ -#include "lib/warnings.h" -DCPOMATIC_DISABLE_WARNINGS +#include "lib/collator.h" +#include "lib/config.h" +#include +LIBDCP_DISABLE_WARNINGS #include #include #include -DCPOMATIC_ENABLE_WARNINGS +LIBDCP_ENABLE_WARNINGS #include #include #include @@ -37,7 +39,7 @@ namespace dcpomatic { class Cinema; -struct UCollator; +class CheckBox; class ScreensPanel : public wxPanel @@ -57,27 +59,38 @@ private: boost::optional add_screen (std::shared_ptr, std::shared_ptr); void add_cinema_clicked (); void edit_cinema_clicked (); + void edit_cinema(std::shared_ptr cinema); void remove_cinema_clicked (); void add_screen_clicked (); void edit_screen_clicked (); + void edit_screen(std::shared_ptr screen); void remove_screen_clicked (); void selection_changed_shim (wxTreeListEvent &); void selection_changed (); - void search_changed (); + void display_filter_changed(); void checkbox_changed (wxTreeListEvent& ev); + void item_activated(wxTreeListEvent& ev); std::shared_ptr cinema_for_operation () const; void set_screen_checked (wxTreeListItem item, bool checked); void setup_cinema_checked_state (wxTreeListItem screen); - int compare (std::string const& utf8_a, std::string const& utf8_b); void check_all (); void uncheck_all (); + bool notify_cinemas_changed(); + void clear_and_re_add(); + void config_changed(Config::Property); + void convert_to_lower(std::string& s); + bool matches_search(std::shared_ptr cinema, std::string search); + std::list> sorted_cinemas() const; + void setup_show_only_checked(); std::shared_ptr item_to_cinema (wxTreeListItem item) const; std::shared_ptr item_to_screen (wxTreeListItem item) const; boost::optional cinema_to_item (std::shared_ptr cinema) const; boost::optional screen_to_item (std::shared_ptr screen) const; + wxBoxSizer* _overall_sizer; wxSearchCtrl* _search; + CheckBox* _show_only_checked; wxTreeListCtrl* _targets; wxButton* _add_cinema; wxButton* _edit_cinema; @@ -107,5 +120,8 @@ private: bool _ignore_selection_change = false; bool _ignore_check_change = false; - UCollator* _collator = nullptr; + Collator _collator; + + boost::signals2::scoped_connection _config_connection; + bool _ignore_cinemas_changed = false; };