interfCalibrationPanel Class Reference

#include <interfToolsPanels.h>

List of all members.

Public Member Functions

 interfCalibrationPanel (wxWindow *parent)
 ~interfCalibrationPanel ()
void onCalibrate (wxCommandEvent &event)

Private Attributes

wxTextCtrl * _size
wxRadioBox * _unitsRadiobox


Detailed Description

This class represents the calibration panel in the interface icons

Definition at line 100 of file interfToolsPanels.h.


Constructor & Destructor Documentation

interfCalibrationPanel::interfCalibrationPanel ( wxWindow *  parent  ) 

Initialized the panel

Parameters:
parent Window who contains the panel

Definition at line 488 of file interfToolsPanels.cxx.

References _size, _unitsRadiobox, interfMainPanel::getImageRange(), interfMainPanel::getInstance(), and onCalibrate().

00489 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
00490 {
00491         double range[2];
00492         interfMainPanel::getInstance()->getImageRange(range);
00493 
00494         //Radio buttons
00495         wxString options[3];
00496         options[0]=_T("mm");
00497         options[1]=_T("cm");
00498         options[2]=_T("inch");
00499 
00500         _unitsRadiobox = new wxRadioBox(this, -1, _T("Unit of measurement"), wxPoint(2, 25), wxSize(145,45), 3 , options,  3, wxRA_SPECIFY_COLS);
00501         _unitsRadiobox->SetSelection(0);
00502 
00503         //The label
00504         new wxStaticText(this, wxID_ANY, wxT("Real Size: "),   wxPoint(2, 5));
00505 
00506         //Text Control
00507         _size = new wxTextCtrl(this, wxID_ANY, wxT(""),  wxPoint(78,3),   wxSize(70, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
00508 
00509         //The button
00510         new wxButton(this, 1, wxT("Calibrate"), wxPoint(78, 70), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
00511 
00512         //Conexion del boton con su respectivo manejador
00513         Connect(1, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfCalibrationPanel::onCalibrate);
00514 
00515 }

Here is the call graph for this function:

interfCalibrationPanel::~interfCalibrationPanel (  ) 

Definition at line 517 of file interfToolsPanels.cxx.

00518 {
00519 }


Member Function Documentation

void interfCalibrationPanel::onCalibrate ( wxCommandEvent &  event  ) 

Manages the event associated with the button of calibration

Definition at line 521 of file interfToolsPanels.cxx.

References _size, _unitsRadiobox, interfMainPanel::getInstance(), and interfMainPanel::onCalibration().

Referenced by interfCalibrationPanel().

00522 {
00523         wxString size =_size->GetValue();
00524         int unit = _unitsRadiobox->GetSelection();
00525         interfMainPanel::getInstance()->onCalibration(size, unit);
00526 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

wxTextCtrl* interfCalibrationPanel::_size [private]

Text field of the calibration measure

Definition at line 123 of file interfToolsPanels.h.

Referenced by interfCalibrationPanel(), and onCalibrate().

Radio Box with the measurement units

Definition at line 128 of file interfToolsPanels.h.

Referenced by interfCalibrationPanel(), and onCalibrate().


The documentation for this class was generated from the following files:

Generated on Wed Jun 27 23:28:33 2012 for creaContours_lib by  doxygen 1.5.7.1