dijkstrabox.h
author hegyi
Fri, 13 Oct 2006 13:53:44 +0000
changeset 163 443bc769b344
child 165 2cd447b0bd3a
permissions -rw-r--r--
Dijkstra in GUI - and the body...
     1 // -*- C++ -*- //
     2 
     3 #ifndef DIJKSTRABOX_H
     4 #define DIJKSTRABOX_H
     5 
     6 class DijkstraBox;
     7 
     8 #include <all_include.h>
     9 #include <algobox.h>
    10 #include <lemon/dijkstra.h>
    11 #include <libgnomecanvasmm.h>
    12 #include <libgnomecanvasmm/polygon.h>
    13 
    14 ///Graphical interface to run Dijkstra algorithm.
    15 
    16 ///Child of \ref AlgoBox,
    17 ///therefore the only task to do at implementation was to
    18 ///
    19 ///-call init function with correct parameters from correctly parametrized constructor
    20 ///
    21 ///-implement \ref build_box function
    22 ///
    23 ///-implement \ref run function
    24 class DijkstraBox : public AlgoBox
    25 {
    26   ///Shows result of Dijkstra algorithm
    27   Gtk::Label resultlabel;
    28 
    29 
    30   ///Table for nodeselector widgets
    31   Gtk::Table table;
    32 
    33   ///Combobox for select source node
    34   Gtk::ComboBoxText source;
    35 
    36   ///Combobox for select target node
    37   Gtk::ComboBoxText target;
    38 
    39 public:
    40   ///Calls \ref AlgoBox::init function to initialize class properly, automatically.
    41   DijkstraBox(std::vector<std::string> t);
    42 
    43   ///Prepare, run and postprocess Dijkstra algorithm.
    44 
    45   ///\ref glemon works only with maps filled with double values
    46   ///at the moment. While Dijkstra nedds a bool map as output.
    47   ///As postprocess this bool map should be transformed to
    48   ///double map.
    49   void run();
    50 
    51   ///Builds the graphical design of the interface.
    52   void build_box();
    53 
    54   void maplists_updated();
    55 };
    56 #endif //DIJKSTRABOX_H