X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fdeparturesdialog.h;h=bbc8246bdfe46b79d612913af12336bd832f3c07;hb=abed4a255060d5a233ec0ac2dd60af9132e29201;hp=9dc99b84922a145ca1b6a161dd9f36f1036e64c8;hpb=d84f187ca34a6ab2f8c37d85fa13d5c113714344;p=r2c2.git diff --git a/source/engineer/departuresdialog.h b/source/engineer/departuresdialog.h index 9dc99b8..bbc8246 100644 --- a/source/engineer/departuresdialog.h +++ b/source/engineer/departuresdialog.h @@ -1,13 +1,25 @@ #ifndef DEPARTURESDIALOG_H_ #define DEPARTURESDIALOG_H_ -#include #include #include #include "libr2c2/departures.h" +#include "dynamicdialog.h" -class DeparturesDialog: public Msp::GLtk::Dialog +class Engineer; + +class DeparturesDialog: public DynamicDialog { +public: + class StateLoader: public Msp::DataFile::DerivedObjectLoader + { + public: + StateLoader(DeparturesDialog &); + + private: + void group(const std::string &); + }; + private: struct Row { @@ -29,13 +41,16 @@ private: std::vector rows; public: - DeparturesDialog(const R2C2::Layout &, const std::string & = std::string()); + DeparturesDialog(Engineer &, const std::string & = std::string()); + + void set_group(const std::string &); private: void group_selected(unsigned); - void departure_added(const R2C2::Departures::Departure &); - void departure_removed(const R2C2::Departures::Departure &); void update_rows(); + +public: + virtual bool save_state(Msp::DataFile::Statement &) const; }; #endif