Use hg changeset hash instead of svn revision.
1 #include "save_details_widget.h"
2 #include "mapstorage.h"
4 SaveDetailsWidget::SaveDetailsWidget(MapStorage* ms) :
7 Gtk::Notebook* nb = Gtk::manage(new Gtk::Notebook);
8 pack_start(*nb, Gtk::PACK_EXPAND_WIDGET);
10 nb->set_tab_pos(Gtk::POS_TOP);
12 Gtk::VBox* vblueMaps = Gtk::manage(new Gtk::VBox(false, 18));
13 vblueMaps->set_border_width(12);
15 Gtk::VBox* vbArcMaps = Gtk::manage(new Gtk::VBox(false, 18));
16 vbArcMaps->set_border_width(12);
18 Gtk::VBox* vbSpecMaps = Gtk::manage(new Gtk::VBox(false, 18));
19 vbSpecMaps->set_border_width(12);
21 Gtk::VBox* vbGuiSect = Gtk::manage(new Gtk::VBox(false, 18));
22 vbGuiSect->set_border_width(12);
24 nb->append_page(*vbSpecMaps, "Special Maps");
25 nb->append_page(*vblueMaps, "Node Maps");
26 nb->append_page(*vbArcMaps, "Arc Maps");
27 nb->append_page(*vbGuiSect, "GUI Section");
29 // child widgets of vbSpecMaps
32 Gtk::VBox* box1 = Gtk::manage(new Gtk::VBox(false, 6));
33 vbSpecMaps->pack_start(*box1, Gtk::PACK_SHRINK);
35 Gtk::Label* lblNodeCoordMap =
36 Gtk::manage(new Gtk::Label("<b>Node Coordinates</b>"));
37 lblNodeCoordMap->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
38 lblNodeCoordMap->set_use_markup();
39 box1->pack_start(*lblNodeCoordMap, Gtk::PACK_SHRINK);
41 Gtk::HBox* box2 = Gtk::manage(new Gtk::HBox);
42 box1->pack_start(*box2, Gtk::PACK_SHRINK);
44 Gtk::Label* fill1 = Gtk::manage(new Gtk::Label(" "));
45 box2->pack_start(*fill1, Gtk::PACK_SHRINK);
47 Gtk::VBox* box3 = Gtk::manage(new Gtk::VBox);
48 box2->pack_start(*box3, Gtk::PACK_SHRINK);
50 rblueCoordGuiSection.set_label("Save to GUI section");
51 rblueCoordNodesetSection.set_label("Save to Nodeset section");
52 Gtk::RadioButtonGroup group = rblueCoordGuiSection.get_group();
53 rblueCoordNodesetSection.set_group(group);
55 box3->pack_start(rblueCoordGuiSection, Gtk::PACK_SHRINK);
56 box3->pack_start(rblueCoordNodesetSection, Gtk::PACK_SHRINK);
58 Gtk::HBox* box4 = Gtk::manage(new Gtk::HBox);
59 box3->pack_start(*box4, Gtk::PACK_SHRINK);
61 Gtk::Label* fill2 = Gtk::manage(new Gtk::Label(" "));
62 box4->pack_start(*fill2, Gtk::PACK_SHRINK);
64 Gtk::Table* table1 = Gtk::manage(new Gtk::Table(3, 2));
65 box4->pack_start(*table1, Gtk::PACK_SHRINK);
67 rblueCoordOneMap.set_label("As one map");
68 rblueCoordTwoMaps.set_label("As two maps");
69 group = rblueCoordOneMap.get_group();
70 rblueCoordTwoMaps.set_group(group);
72 table1->attach(rblueCoordOneMap, 0, 1, 0, 1);
73 table1->attach(rblueCoordTwoMaps, 0, 1, 1, 2);
74 table1->attach(entNodeCoordsOneMap, 1, 2, 0, 1);
75 table1->attach(entNodeCoordsTwoMaps1, 1, 2, 1, 2);
76 table1->attach(entNodeCoordsTwoMaps2, 1, 2, 2, 3);
78 switch (pMapStorage->getNodeCoordsSaveDest())
80 case MapStorage::SpecMapSaveOpts::GUI_SECT:
81 rblueCoordGuiSection.set_active();
82 rblueCoordOneMap.set_sensitive(false);
83 rblueCoordTwoMaps.set_sensitive(false);
84 entNodeCoordsOneMap.set_sensitive(false);
85 entNodeCoordsTwoMaps1.set_sensitive(false);
86 entNodeCoordsTwoMaps2.set_sensitive(false);
88 case MapStorage::SpecMapSaveOpts::NESET_SECT:
89 rblueCoordNodesetSection.set_active();
90 rblueCoordOneMap.set_sensitive(true);
91 rblueCoordTwoMaps.set_sensitive(true);
92 switch (pMapStorage->getNodeCoordsSaveMapNum())
94 case MapStorage::SpecMapSaveOpts::ONE_MAP:
95 rblueCoordOneMap.set_active();
96 entNodeCoordsOneMap.set_sensitive(true);
97 entNodeCoordsTwoMaps1.set_sensitive(false);
98 entNodeCoordsTwoMaps2.set_sensitive(false);
100 case MapStorage::SpecMapSaveOpts::TWO_MAPS:
101 rblueCoordTwoMaps.set_active();
102 entNodeCoordsOneMap.set_sensitive(false);
103 entNodeCoordsTwoMaps1.set_sensitive(true);
104 entNodeCoordsTwoMaps2.set_sensitive(true);
110 entNodeCoordsOneMap.set_text(pMapStorage->getNodeCoordsOneMapName());
111 entNodeCoordsTwoMaps1.set_text(pMapStorage->getNodeCoordsTwoMaps1Name());
112 entNodeCoordsTwoMaps2.set_text(pMapStorage->getNodeCoordsTwoMaps2Name());
114 entNodeCoordsOneMap.signal_changed().connect(
115 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordsOneMapName));
116 entNodeCoordsTwoMaps1.signal_changed().connect(
117 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordsTwoMaps1Name));
118 entNodeCoordsTwoMaps2.signal_changed().connect(
119 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordsTwoMaps2Name));
121 rblueCoordGuiSection.signal_toggled().connect(
122 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordSaveDestChanged));
123 rblueCoordNodesetSection.signal_toggled().connect(
124 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordSaveDestChanged));
125 rblueCoordOneMap.signal_toggled().connect(
126 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordMapNumChanged));
127 rblueCoordTwoMaps.signal_toggled().connect(
128 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeCoordMapNumChanged));
132 Gtk::VBox* box1 = Gtk::manage(new Gtk::VBox(false, 6));
133 vbSpecMaps->pack_start(*box1, Gtk::PACK_SHRINK);
135 Gtk::Label* lblArrowCoordMap =
136 Gtk::manage(new Gtk::Label("<b>Arrow Coordinates</b>"));
137 lblArrowCoordMap->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
138 lblArrowCoordMap->set_use_markup();
139 box1->pack_start(*lblArrowCoordMap, Gtk::PACK_SHRINK);
141 Gtk::HBox* box2 = Gtk::manage(new Gtk::HBox);
142 box1->pack_start(*box2, Gtk::PACK_SHRINK);
144 Gtk::Label* fill1 = Gtk::manage(new Gtk::Label(" "));
145 box2->pack_start(*fill1, Gtk::PACK_SHRINK);
147 Gtk::VBox* box3 = Gtk::manage(new Gtk::VBox);
148 box2->pack_start(*box3, Gtk::PACK_SHRINK);
150 rbArrowCoordGuiSection.set_label("Save to GUI section");
151 rbArrowCoordArcsetSection.set_label("Save to Arcset section");
152 Gtk::RadioButtonGroup group = rbArrowCoordGuiSection.get_group();
153 rbArrowCoordArcsetSection.set_group(group);
155 box3->pack_start(rbArrowCoordGuiSection, Gtk::PACK_SHRINK);
156 box3->pack_start(rbArrowCoordArcsetSection, Gtk::PACK_SHRINK);
158 Gtk::HBox* box4 = Gtk::manage(new Gtk::HBox);
159 box3->pack_start(*box4, Gtk::PACK_SHRINK);
161 Gtk::Label* fill2 = Gtk::manage(new Gtk::Label(" "));
162 box4->pack_start(*fill2, Gtk::PACK_SHRINK);
164 Gtk::Table* table1 = Gtk::manage(new Gtk::Table(3, 2));
165 box4->pack_start(*table1, Gtk::PACK_SHRINK);
167 rbArrowCoordOneMap.set_label("As one map");
168 rbArrowCoordTwoMaps.set_label("As two maps");
169 group = rbArrowCoordOneMap.get_group();
170 rbArrowCoordTwoMaps.set_group(group);
172 table1->attach(rbArrowCoordOneMap, 0, 1, 0, 1);
173 table1->attach(rbArrowCoordTwoMaps, 0, 1, 1, 2);
174 table1->attach(entArrowCoordsOneMap, 1, 2, 0, 1);
175 table1->attach(entArrowCoordsTwoMaps1, 1, 2, 1, 2);
176 table1->attach(entArrowCoordsTwoMaps2, 1, 2, 2, 3);
178 switch (pMapStorage->getArrowCoordsSaveDest())
180 case MapStorage::SpecMapSaveOpts::GUI_SECT:
181 rbArrowCoordGuiSection.set_active();
182 rbArrowCoordOneMap.set_sensitive(false);
183 rbArrowCoordTwoMaps.set_sensitive(false);
184 entArrowCoordsOneMap.set_sensitive(false);
185 entArrowCoordsTwoMaps1.set_sensitive(false);
186 entArrowCoordsTwoMaps2.set_sensitive(false);
188 case MapStorage::SpecMapSaveOpts::NESET_SECT:
189 rbArrowCoordArcsetSection.set_active();
190 rbArrowCoordOneMap.set_sensitive(true);
191 rbArrowCoordTwoMaps.set_sensitive(true);
192 switch (pMapStorage->getArrowCoordsSaveMapNum())
194 case MapStorage::SpecMapSaveOpts::ONE_MAP:
195 rbArrowCoordOneMap.set_active();
196 entArrowCoordsOneMap.set_sensitive(true);
197 entArrowCoordsTwoMaps1.set_sensitive(false);
198 entArrowCoordsTwoMaps2.set_sensitive(false);
200 case MapStorage::SpecMapSaveOpts::TWO_MAPS:
201 rbArrowCoordTwoMaps.set_active();
202 entArrowCoordsOneMap.set_sensitive(false);
203 entArrowCoordsTwoMaps1.set_sensitive(true);
204 entArrowCoordsTwoMaps2.set_sensitive(true);
210 entArrowCoordsOneMap.set_text(pMapStorage->getArrowCoordsOneMapName());
211 entArrowCoordsTwoMaps1.set_text(pMapStorage->getArrowCoordsTwoMaps1Name());
212 entArrowCoordsTwoMaps2.set_text(pMapStorage->getArrowCoordsTwoMaps2Name());
214 entArrowCoordsOneMap.signal_changed().connect(
215 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordsOneMapName));
216 entArrowCoordsTwoMaps1.signal_changed().connect(
217 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordsTwoMaps1Name));
218 entArrowCoordsTwoMaps2.signal_changed().connect(
219 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordsTwoMaps2Name));
221 rbArrowCoordGuiSection.signal_toggled().connect(
222 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordSaveDestChanged));
223 rbArrowCoordArcsetSection.signal_toggled().connect(
224 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordSaveDestChanged));
225 rbArrowCoordOneMap.signal_toggled().connect(
226 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordMapNumChanged));
227 rbArrowCoordTwoMaps.signal_toggled().connect(
228 sigc::mem_fun(*this, &SaveDetailsWidget::onArrowCoordMapNumChanged));
231 // child widgets of vbGuiSect
234 Gtk::VBox* box1 = Gtk::manage(new Gtk::VBox(false, 6));
235 vbGuiSect->pack_start(*box1, Gtk::PACK_SHRINK);
237 Gtk::Label* lblGuiSectionSave =
238 Gtk::manage(new Gtk::Label("<b>Save Destination</b>"));
239 lblGuiSectionSave->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
240 lblGuiSectionSave->set_use_markup();
241 box1->pack_start(*lblGuiSectionSave, Gtk::PACK_SHRINK);
243 rbLgfFile.set_label("Lgf file");
244 rbConfFile.set_label("Conf file");
246 Gtk::RadioButtonGroup group = rbLgfFile.get_group();
247 rbConfFile.set_group(group);
249 switch (pMapStorage->getGUIDataSaveLocation())
251 case MapStorage::LGF_FILE:
252 rbLgfFile.set_active();
254 case MapStorage::CONF_FILE:
255 rbConfFile.set_active();
259 Gtk::HBox* box2 = Gtk::manage(new Gtk::HBox);
260 box1->pack_start(*box2, Gtk::PACK_SHRINK);
262 Gtk::Label* fill1 = Gtk::manage(new Gtk::Label(" "));
263 box2->pack_start(*fill1, Gtk::PACK_SHRINK);
265 Gtk::VBox* box3 = Gtk::manage(new Gtk::VBox);
266 box2->pack_start(*box3, Gtk::PACK_SHRINK);
268 box3->pack_start(rbLgfFile, Gtk::PACK_SHRINK);
269 box3->pack_start(rbConfFile, Gtk::PACK_SHRINK);
271 rbLgfFile.signal_toggled().connect(
272 sigc::mem_fun(*this, &SaveDetailsWidget::onGuiSectSaveDestChanged));
273 rbConfFile.signal_toggled().connect(
274 sigc::mem_fun(*this, &SaveDetailsWidget::onGuiSectSaveDestChanged));
277 // child widgets of vblueMaps
280 Gtk::VBox* box1 = Gtk::manage(new Gtk::VBox(false, 6));
281 vblueMaps->pack_start(*box1, Gtk::PACK_SHRINK);
284 Gtk::manage(new Gtk::Label("<b>Save Destination</b>"));
285 label1->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
286 label1->set_use_markup();
287 box1->pack_start(*label1, Gtk::PACK_SHRINK);
289 Gtk::HBox* box2 = Gtk::manage(new Gtk::HBox);
290 box1->pack_start(*box2, Gtk::PACK_SHRINK);
292 Gtk::Label* fill1 = Gtk::manage(new Gtk::Label(" "));
293 box2->pack_start(*fill1, Gtk::PACK_SHRINK);
295 Gtk::Frame* frame = Gtk::manage(new Gtk::Frame);
296 box2->pack_start(*frame, Gtk::PACK_EXPAND_WIDGET);
298 Gtk::ScrolledWindow* swNodeMaps = Gtk::manage(new Gtk::ScrolledWindow);
299 frame->add(*swNodeMaps);
301 swNodeMaps->add(twNodeMaps);
303 refNodeMapStore = Gtk::ListStore::create(NodeMapColumns);
305 std::vector<std::string> node_maps = pMapStorage->getNodeMapList();
306 for (std::vector<std::string>::const_iterator it = node_maps.begin();
307 it != node_maps.end(); ++it)
309 Gtk::TreeModel::Row row = *(refNodeMapStore->append());
310 row[NodeMapColumns.colName] = *it;
311 switch (pMapStorage->getNodeMapSaveDest(*it))
313 case MapStorage::GUI_SECT:
314 row[NodeMapColumns.colSaveToMainSect] = false;
315 row[NodeMapColumns.colSaveToGuiSect] = true;
317 case MapStorage::NESET_SECT:
318 row[NodeMapColumns.colSaveToMainSect] = true;
319 row[NodeMapColumns.colSaveToGuiSect] = false;
321 case MapStorage::DONT_SAVE:
322 row[NodeMapColumns.colSaveToMainSect] = false;
323 row[NodeMapColumns.colSaveToGuiSect] = false;
328 twNodeMaps.set_model(refNodeMapStore);
329 twNodeMaps.append_column("Name", NodeMapColumns.colName);
330 twNodeMaps.append_column_editable("Nodeset section",
331 NodeMapColumns.colSaveToMainSect);
332 twNodeMaps.append_column_editable("GUI section",
333 NodeMapColumns.colSaveToGuiSect);
335 swNodeMaps->set_size_request(-1, 200);
336 swNodeMaps->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
338 refNodeMapStore->signal_row_changed().connect(
339 sigc::mem_fun(*this, &SaveDetailsWidget::onNodeMapRowChanged));
342 // child widgets of vbArcMaps
345 Gtk::VBox* box1 = Gtk::manage(new Gtk::VBox(false, 6));
346 vbArcMaps->pack_start(*box1, Gtk::PACK_SHRINK);
349 Gtk::manage(new Gtk::Label("<b>Save Destination</b>"));
350 label1->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER);
351 label1->set_use_markup();
352 box1->pack_start(*label1, Gtk::PACK_SHRINK);
354 Gtk::HBox* box2 = Gtk::manage(new Gtk::HBox);
355 box1->pack_start(*box2, Gtk::PACK_SHRINK);
357 Gtk::Label* fill1 = Gtk::manage(new Gtk::Label(" "));
358 box2->pack_start(*fill1, Gtk::PACK_SHRINK);
360 Gtk::Frame* frame = Gtk::manage(new Gtk::Frame);
361 box2->pack_start(*frame, Gtk::PACK_EXPAND_WIDGET);
363 Gtk::ScrolledWindow* swArcMaps = Gtk::manage(new Gtk::ScrolledWindow);
364 frame->add(*swArcMaps);
366 swArcMaps->add(twArcMaps);
368 refArcMapStore = Gtk::ListStore::create(ArcMapColumns);
370 std::vector<std::string> arc_maps = pMapStorage->getArcMapList();
371 for (std::vector<std::string>::const_iterator it = arc_maps.begin();
372 it != arc_maps.end(); ++it)
374 Gtk::TreeModel::Row row = *(refArcMapStore->append());
375 row[ArcMapColumns.colName] = *it;
376 switch (pMapStorage->getArcMapSaveDest(*it))
378 case MapStorage::GUI_SECT:
379 row[ArcMapColumns.colSaveToMainSect] = false;
380 row[ArcMapColumns.colSaveToGuiSect] = true;
382 case MapStorage::NESET_SECT:
383 row[ArcMapColumns.colSaveToMainSect] = true;
384 row[ArcMapColumns.colSaveToGuiSect] = false;
386 case MapStorage::DONT_SAVE:
387 row[ArcMapColumns.colSaveToMainSect] = false;
388 row[ArcMapColumns.colSaveToGuiSect] = false;
393 twArcMaps.set_model(refArcMapStore);
394 twArcMaps.append_column("Name", ArcMapColumns.colName);
395 twArcMaps.append_column_editable("Arcset section",
396 ArcMapColumns.colSaveToMainSect);
397 twArcMaps.append_column_editable("GUI section",
398 ArcMapColumns.colSaveToGuiSect);
400 swArcMaps->set_size_request(-1, 200);
401 swArcMaps->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
403 refArcMapStore->signal_row_changed().connect(
404 sigc::mem_fun(*this, &SaveDetailsWidget::onArcMapRowChanged));
410 void SaveDetailsWidget::onGuiSectSaveDestChanged()
412 if (rbLgfFile.get_active())
414 pMapStorage->setGUIDataSaveLocation(MapStorage::LGF_FILE);
416 else if (rbConfFile.get_active())
418 pMapStorage->setGUIDataSaveLocation(MapStorage::CONF_FILE);
422 void SaveDetailsWidget::onArcMapRowChanged(const Gtk::TreeModel::Path& path,
423 const Gtk::TreeModel::iterator& iter)
425 Gtk::TreeModel::Row row = *iter;
426 Glib::ustring map_name = row[ArcMapColumns.colName];
427 if (row[ArcMapColumns.colSaveToMainSect] &&
428 row[ArcMapColumns.colSaveToGuiSect])
430 if (pMapStorage->getArcMapSaveDest(map_name) == MapStorage::NESET_SECT)
432 pMapStorage->setArcMapSaveDest(map_name, MapStorage::GUI_SECT);
433 row[ArcMapColumns.colSaveToMainSect] = false;
437 pMapStorage->setArcMapSaveDest(map_name, MapStorage::NESET_SECT);
438 row[ArcMapColumns.colSaveToGuiSect] = false;
441 else if (row[ArcMapColumns.colSaveToMainSect])
443 pMapStorage->setArcMapSaveDest(map_name, MapStorage::NESET_SECT);
445 else if (row[ArcMapColumns.colSaveToGuiSect])
447 pMapStorage->setArcMapSaveDest(map_name, MapStorage::GUI_SECT);
451 pMapStorage->setArcMapSaveDest(map_name, MapStorage::DONT_SAVE);
455 void SaveDetailsWidget::onNodeMapRowChanged(const Gtk::TreeModel::Path& path,
456 const Gtk::TreeModel::iterator& iter)
458 Gtk::TreeModel::Row row = *iter;
459 Glib::ustring map_name = row[NodeMapColumns.colName];
460 if (row[NodeMapColumns.colSaveToMainSect] &&
461 row[NodeMapColumns.colSaveToGuiSect])
463 if (pMapStorage->getNodeMapSaveDest(map_name) == MapStorage::NESET_SECT)
465 pMapStorage->setNodeMapSaveDest(map_name, MapStorage::GUI_SECT);
466 row[NodeMapColumns.colSaveToMainSect] = false;
470 pMapStorage->setNodeMapSaveDest(map_name, MapStorage::NESET_SECT);
471 row[NodeMapColumns.colSaveToGuiSect] = false;
474 else if (row[NodeMapColumns.colSaveToMainSect])
476 pMapStorage->setNodeMapSaveDest(map_name, MapStorage::NESET_SECT);
478 else if (row[NodeMapColumns.colSaveToGuiSect])
480 pMapStorage->setNodeMapSaveDest(map_name, MapStorage::GUI_SECT);
484 pMapStorage->setNodeMapSaveDest(map_name, MapStorage::DONT_SAVE);
488 void SaveDetailsWidget::onNodeCoordSaveDestChanged()
490 if (rblueCoordGuiSection.get_active())
492 pMapStorage->setNodeCoordsSaveDest(MapStorage::SpecMapSaveOpts::GUI_SECT);
493 rblueCoordOneMap.set_sensitive(false);
494 rblueCoordTwoMaps.set_sensitive(false);
495 entNodeCoordsOneMap.set_sensitive(false);
496 entNodeCoordsTwoMaps1.set_sensitive(false);
497 entNodeCoordsTwoMaps2.set_sensitive(false);
499 else if (rblueCoordNodesetSection.get_active())
501 pMapStorage->setNodeCoordsSaveDest(MapStorage::SpecMapSaveOpts::NESET_SECT);
502 rblueCoordOneMap.set_sensitive(true);
503 rblueCoordTwoMaps.set_sensitive(true);
504 switch (pMapStorage->getNodeCoordsSaveMapNum())
506 case MapStorage::SpecMapSaveOpts::ONE_MAP:
507 entNodeCoordsOneMap.set_sensitive(true);
508 entNodeCoordsTwoMaps1.set_sensitive(false);
509 entNodeCoordsTwoMaps2.set_sensitive(false);
511 case MapStorage::SpecMapSaveOpts::TWO_MAPS:
512 entNodeCoordsOneMap.set_sensitive(false);
513 entNodeCoordsTwoMaps1.set_sensitive(true);
514 entNodeCoordsTwoMaps2.set_sensitive(true);
520 void SaveDetailsWidget::onNodeCoordMapNumChanged()
522 if (rblueCoordOneMap.get_active())
524 pMapStorage->setNodeCoordsSaveMapNum(MapStorage::SpecMapSaveOpts::ONE_MAP);
525 entNodeCoordsOneMap.set_sensitive(true);
526 entNodeCoordsTwoMaps1.set_sensitive(false);
527 entNodeCoordsTwoMaps2.set_sensitive(false);
529 else if (rblueCoordTwoMaps.get_active())
531 pMapStorage->setNodeCoordsSaveMapNum(MapStorage::SpecMapSaveOpts::TWO_MAPS);
532 entNodeCoordsOneMap.set_sensitive(false);
533 entNodeCoordsTwoMaps1.set_sensitive(true);
534 entNodeCoordsTwoMaps2.set_sensitive(true);
538 void SaveDetailsWidget::onNodeCoordsOneMapName()
540 pMapStorage->setNodeCoordsOneMapName(entNodeCoordsOneMap.get_text());
542 void SaveDetailsWidget::onNodeCoordsTwoMaps1Name()
544 pMapStorage->setNodeCoordsTwoMaps1Name(entNodeCoordsTwoMaps1.get_text());
546 void SaveDetailsWidget::onNodeCoordsTwoMaps2Name()
548 pMapStorage->setNodeCoordsTwoMaps2Name(entNodeCoordsTwoMaps2.get_text());
551 void SaveDetailsWidget::onArrowCoordSaveDestChanged()
553 if (rbArrowCoordGuiSection.get_active())
555 pMapStorage->setArrowCoordsSaveDest(MapStorage::SpecMapSaveOpts::GUI_SECT);
556 rbArrowCoordOneMap.set_sensitive(false);
557 rbArrowCoordTwoMaps.set_sensitive(false);
558 entArrowCoordsOneMap.set_sensitive(false);
559 entArrowCoordsTwoMaps1.set_sensitive(false);
560 entArrowCoordsTwoMaps2.set_sensitive(false);
562 else if (rbArrowCoordArcsetSection.get_active())
564 pMapStorage->setArrowCoordsSaveDest(MapStorage::SpecMapSaveOpts::NESET_SECT);
565 rbArrowCoordOneMap.set_sensitive(true);
566 rbArrowCoordTwoMaps.set_sensitive(true);
567 switch (pMapStorage->getArrowCoordsSaveMapNum())
569 case MapStorage::SpecMapSaveOpts::ONE_MAP:
570 entArrowCoordsOneMap.set_sensitive(true);
571 entArrowCoordsTwoMaps1.set_sensitive(false);
572 entArrowCoordsTwoMaps2.set_sensitive(false);
574 case MapStorage::SpecMapSaveOpts::TWO_MAPS:
575 entArrowCoordsOneMap.set_sensitive(false);
576 entArrowCoordsTwoMaps1.set_sensitive(true);
577 entArrowCoordsTwoMaps2.set_sensitive(true);
583 void SaveDetailsWidget::onArrowCoordMapNumChanged()
585 if (rbArrowCoordOneMap.get_active())
587 pMapStorage->setArrowCoordsSaveMapNum(MapStorage::SpecMapSaveOpts::ONE_MAP);
588 entArrowCoordsOneMap.set_sensitive(true);
589 entArrowCoordsTwoMaps1.set_sensitive(false);
590 entArrowCoordsTwoMaps2.set_sensitive(false);
592 else if (rbArrowCoordTwoMaps.get_active())
594 pMapStorage->setArrowCoordsSaveMapNum(MapStorage::SpecMapSaveOpts::TWO_MAPS);
595 entArrowCoordsOneMap.set_sensitive(false);
596 entArrowCoordsTwoMaps1.set_sensitive(true);
597 entArrowCoordsTwoMaps2.set_sensitive(true);
601 void SaveDetailsWidget::onArrowCoordsOneMapName()
603 pMapStorage->setArrowCoordsOneMapName(entArrowCoordsOneMap.get_text());
605 void SaveDetailsWidget::onArrowCoordsTwoMaps1Name()
607 pMapStorage->setArrowCoordsTwoMaps1Name(entArrowCoordsTwoMaps1.get_text());
609 void SaveDetailsWidget::onArrowCoordsTwoMaps2Name()
611 pMapStorage->setArrowCoordsTwoMaps2Name(entArrowCoordsTwoMaps2.get_text());
614 SaveDetailsWidget::~SaveDetailsWidget()