dijkstrabox.h
changeset 163 443bc769b344
child 165 2cd447b0bd3a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dijkstrabox.h	Fri Oct 13 13:53:44 2006 +0000
     1.3 @@ -0,0 +1,56 @@
     1.4 +// -*- C++ -*- //
     1.5 +
     1.6 +#ifndef DIJKSTRABOX_H
     1.7 +#define DIJKSTRABOX_H
     1.8 +
     1.9 +class DijkstraBox;
    1.10 +
    1.11 +#include <all_include.h>
    1.12 +#include <algobox.h>
    1.13 +#include <lemon/dijkstra.h>
    1.14 +#include <libgnomecanvasmm.h>
    1.15 +#include <libgnomecanvasmm/polygon.h>
    1.16 +
    1.17 +///Graphical interface to run Dijkstra algorithm.
    1.18 +
    1.19 +///Child of \ref AlgoBox,
    1.20 +///therefore the only task to do at implementation was to
    1.21 +///
    1.22 +///-call init function with correct parameters from correctly parametrized constructor
    1.23 +///
    1.24 +///-implement \ref build_box function
    1.25 +///
    1.26 +///-implement \ref run function
    1.27 +class DijkstraBox : public AlgoBox
    1.28 +{
    1.29 +  ///Shows result of Dijkstra algorithm
    1.30 +  Gtk::Label resultlabel;
    1.31 +
    1.32 +
    1.33 +  ///Table for nodeselector widgets
    1.34 +  Gtk::Table table;
    1.35 +
    1.36 +  ///Combobox for select source node
    1.37 +  Gtk::ComboBoxText source;
    1.38 +
    1.39 +  ///Combobox for select target node
    1.40 +  Gtk::ComboBoxText target;
    1.41 +
    1.42 +public:
    1.43 +  ///Calls \ref AlgoBox::init function to initialize class properly, automatically.
    1.44 +  DijkstraBox(std::vector<std::string> t);
    1.45 +
    1.46 +  ///Prepare, run and postprocess Dijkstra algorithm.
    1.47 +
    1.48 +  ///\ref glemon works only with maps filled with double values
    1.49 +  ///at the moment. While Dijkstra nedds a bool map as output.
    1.50 +  ///As postprocess this bool map should be transformed to
    1.51 +  ///double map.
    1.52 +  void run();
    1.53 +
    1.54 +  ///Builds the graphical design of the interface.
    1.55 +  void build_box();
    1.56 +
    1.57 +  void maplists_updated();
    1.58 +};
    1.59 +#endif //DIJKSTRABOX_H