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