21 ///-implement \ref build_box function |
20 ///-implement \ref build_box function |
22 /// |
21 /// |
23 ///-implement \ref run function |
22 ///-implement \ref run function |
24 class DijkstraBox : public AlgoBox |
23 class DijkstraBox : public AlgoBox |
25 { |
24 { |
|
25 protected: |
26 ///Shows result of Dijkstra algorithm |
26 ///Shows result of Dijkstra algorithm |
27 Gtk::Label resultlabel; |
27 Gtk::Label resultlabel; |
28 |
28 |
29 |
29 |
30 ///Table for nodeselector widgets |
30 ///Table for nodeselector widgets |
34 Gtk::ComboBoxText source; |
34 Gtk::ComboBoxText source; |
35 |
35 |
36 ///Combobox for select target node |
36 ///Combobox for select target node |
37 Gtk::ComboBoxText target; |
37 Gtk::ComboBoxText target; |
38 |
38 |
|
39 ///Gets to and from node from combobox |
|
40 void get_from_to(Node &, Node &, Graph &); |
|
41 |
39 public: |
42 public: |
40 ///Calls \ref AlgoBox::init function to initialize class properly, automatically. |
43 ///Calls \ref AlgoBox::init function to initialize class properly, automatically. |
41 DijkstraBox(std::vector<std::string> t); |
44 DijkstraBox(std::vector<std::string> t); |
42 |
45 |
43 ///Prepare, run and postprocess Dijkstra algorithm. |
46 ///Prepare, run and postprocess Dijkstra algorithm. |
44 |
47 |
45 ///\ref glemon works only with maps filled with double values |
48 ///\ref glemon works only with maps filled with double values |
46 ///at the moment. While Dijkstra nedds a bool map as output. |
49 ///at the moment. While Dijkstra nedds a bool map as output. |
47 ///As postprocess this bool map should be transformed to |
50 ///As postprocess this bool map should be transformed to |
48 ///double map. |
51 ///double map. |
49 void run(); |
52 virtual void run(); |
50 |
53 |
51 ///Builds the graphical design of the interface. |
54 ///Builds the graphical design of the interface. |
52 void build_box(); |
55 virtual void build_box(); |
53 |
56 |
54 void maplists_updated(); |
57 void maplists_updated(); |
55 }; |
58 }; |
|
59 |
|
60 class SuurballeBox : public DijkstraBox |
|
61 { |
|
62 ///number of paths to find |
|
63 int num; |
|
64 |
|
65 ///Widget to set numbewr of paths to find |
|
66 Gtk::SpinButton * num_set; |
|
67 |
|
68 ///Holder widget |
|
69 Gtk::HBox hbox; |
|
70 |
|
71 public: |
|
72 SuurballeBox(std::vector<std::string> t); |
|
73 void run(); |
|
74 void build_box(); |
|
75 }; |
56 #endif //DIJKSTRABOX_H |
76 #endif //DIJKSTRABOX_H |