creaContours_lib
interfCalibrationPanel Class Reference

#include <interfToolsPanels.h>

Inheritance diagram for interfCalibrationPanel:
Collaboration diagram for interfCalibrationPanel:

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 125 of file interfToolsPanels.h.

Constructor & Destructor Documentation

interfCalibrationPanel::interfCalibrationPanel ( wxWindow *  parent)

Initialized the panel

Parameters
parentWindow who contains the panel

Definition at line 513 of file interfToolsPanels.cxx.

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

514 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
515 {
516  double range[2];
518 
519  //Radio buttons
520  wxString options[3];
521  options[0]=_T("mm");
522  options[1]=_T("cm");
523  options[2]=_T("inch");
524 
525  _unitsRadiobox = new wxRadioBox(this, -1, _T("Unit of measurement"), wxPoint(2, 25), wxSize(145,45), 3 , options, 3, wxRA_SPECIFY_COLS);
526  _unitsRadiobox->SetSelection(0);
527 
528  //The label
529  new wxStaticText(this, wxID_ANY, wxT("Real Size: "), wxPoint(2, 5));
530 
531  //Text Control
532  _size = new wxTextCtrl(this, wxID_ANY, wxT(""), wxPoint(78,3), wxSize(70, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
533 
534  //The button
535  new wxButton(this, 1, wxT("Calibrate"), wxPoint(78, 70), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
536 
537  //Conexion del boton con su respectivo manejador
538  Connect(1, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfCalibrationPanel::onCalibrate);
539 
540 }

Here is the call graph for this function:

interfCalibrationPanel::~interfCalibrationPanel ( )

Definition at line 542 of file interfToolsPanels.cxx.

543 {
544 }

Member Function Documentation

void interfCalibrationPanel::onCalibrate ( wxCommandEvent &  event)

Manages the event associated with the button of calibration

Definition at line 546 of file interfToolsPanels.cxx.

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

Referenced by interfCalibrationPanel().

547 {
548  wxString size =_size->GetValue();
549  int unit = _unitsRadiobox->GetSelection();
551 }

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 148 of file interfToolsPanels.h.

Referenced by interfCalibrationPanel(), and onCalibrate().

wxRadioBox* interfCalibrationPanel::_unitsRadiobox
private

Radio Box with the measurement units

Definition at line 153 of file interfToolsPanels.h.

Referenced by interfCalibrationPanel(), and onCalibrate().


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