design_win.h
author hegyi
Wed, 28 Feb 2007 18:20:28 +0000
changeset 194 6b2b718420eb
parent 177 40f3006fba2e
child 196 c220f9de6545
permissions -rw-r--r--
Header reorganising
     1 /* -*- C++ -*-
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     4  *
     5  * Copyright (C) 2003-2006
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    11  * precise terms see the accompanying LICENSE file.
    12  *
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    16  *
    17  */
    18 
    19 #ifndef DESWIN_H
    20 #define DESWIN_H
    21 
    22 class NoteBookTab;
    23 
    24 #include <all_include.h>
    25 #include <libgnomecanvasmm.h>
    26 #include <libgnomecanvasmm/polygon.h>
    27 
    28 class DesignWin : public Gtk::Window
    29 {
    30 private:
    31   ///\ref NoteBookTab to that the \ref MapWin belongs to.
    32   NoteBookTab & mytab;
    33 
    34   Gtk::SpinButton * attraction;
    35   Gtk::SpinButton * propulsation;
    36   Gtk::SpinButton * iteration;
    37   Gtk::Table table;
    38   Gtk::Button * close_button;
    39 
    40   sigc::signal<void, double> signal_attraction_ch;
    41   sigc::signal<void, double> signal_propulsation_ch;
    42   sigc::signal<void, int> signal_iteration_ch;
    43   sigc::signal<void> close_run_pr;
    44 
    45   void emit_attraction();
    46   void emit_propulsation();
    47   void emit_iteration();
    48   void emit_closerun(){close_run_pr.emit();};
    49 
    50 public:
    51   ///Close window if escape key is pressed.
    52   bool closeIfEscapeIsPressed(GdkEventKey* e);
    53 
    54   ///Constructor
    55 
    56   ///It builds the window.
    57   DesignWin(const std::string&, double, double, int, NoteBookTab & mw);
    58 
    59   sigc::signal<void, double> signal_attraction(){return signal_attraction_ch;};
    60   sigc::signal<void, double> signal_propulsation(){return signal_propulsation_ch;};
    61   sigc::signal<void, int> signal_iteration(){return signal_iteration_ch;};
    62   sigc::signal<void> close_run(){return close_run_pr;};
    63 
    64   void set_title(std::string);
    65 
    66   void set_data(double, double, int);
    67 };
    68 #endif //DESWIN_H