5 #include "util/window_state_store.hpp"
6 #include "util/changeable.hpp"
7 #include "util/export_file_chooser.hpp"
8 #include "board/pnp.hpp"
9 #include "widgets/column_chooser.hpp"
13 class PnPExportWindow :
public Gtk::Window,
public Changeable {
16 PnPExportWindow(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const class Board &brd,
17 class PnPExportSettings &settings,
const std::string &project_dir);
18 static PnPExportWindow *create(Gtk::Window *p,
const class Board &brd,
class PnPExportSettings &settings,
19 const std::string &project_dir);
21 void set_can_export(
bool v);
23 void update_preview();
27 const class Board &board;
28 class PnPExportSettings &settings;
30 ExportFileChooser export_filechooser;
32 Gtk::Button *export_button =
nullptr;
33 Gtk::Label *done_label =
nullptr;
34 Gtk::Revealer *done_revealer =
nullptr;
35 Gtk::Entry *directory_entry =
nullptr;
36 Gtk::Button *directory_button =
nullptr;
38 Gtk::ComboBoxText *mode_combo =
nullptr;
39 Gtk::CheckButton *nopopulate_check =
nullptr;
40 Gtk::Label *filename_merged_label =
nullptr;
41 Gtk::Label *filename_top_label =
nullptr;
42 Gtk::Label *filename_bottom_label =
nullptr;
43 Gtk::Entry *filename_merged_entry =
nullptr;
44 Gtk::Entry *filename_top_entry =
nullptr;
45 Gtk::Entry *filename_bottom_entry =
nullptr;
46 bool can_export =
true;
47 void update_export_button();
49 void update_filename_visibility();
51 Gtk::TreeView *preview_tv =
nullptr;
53 WindowStateStore state_store;
55 ColumnChooser *column_chooser =
nullptr;
57 class MyAdapter :
public ColumnChooser::Adapter<PnPColumn> {
59 using ColumnChooser::Adapter<PnPColumn>::Adapter;
60 std::string get_column_name(
int col)
const override;
61 std::map<int, std::string> get_column_names()
const override;
66 void flash(
const std::string &s);
67 sigc::connection flash_connection;
69 class ListColumnsPreview :
public Gtk::TreeModelColumnRecord {
73 Gtk::TreeModelColumnRecord::add(row);
75 Gtk::TreeModelColumn<PnPRow> row;
77 ListColumnsPreview list_columns_preview;
79 Glib::RefPtr<Gtk::ListStore> store;