00001 /**************************************************************************** 00002 ** ui.h extension file, included from the uic-generated form implementation. 00003 ** 00004 ** If you want to add, delete, or rename functions or slots, use 00005 ** Qt Designer to update this file, preserving your code. 00006 ** 00007 ** You should not define a constructor or destructor in this file. 00008 ** Instead, write your code in functions called init() and destroy(). 00009 ** These will automatically be called by the form's constructor and 00010 ** destructor. 00011 *****************************************************************************/ 00012 00013 #include "Util/StringConversions.H" 00014 #include "Qt/SeaBee3GUIIce.H" 00015 00016 void SeaBee3MainDisplayForm::init( ModelManager *mgr ) 00017 { 00018 itsMgr = mgr; 00019 } 00020 00021 void SeaBee3MainDisplayForm::registerCommunicator( nub::soft_ref<SeaBee3GUIIce> c ) 00022 { 00023 LINFO("Registering Communicator"); 00024 GUIComm = c; 00025 } 00026 00027 void SeaBee3MainDisplayForm::setFwdImage(Image<PixRGB<byte> > &img) 00028 { 00029 itsFwdImgDisplay->setImage(img); 00030 } 00031 00032 void SeaBee3MainDisplayForm::setDwnImage(Image<PixRGB<byte> > &img) 00033 { 00034 itsDwnImgDisplay->setImage(img); 00035 } 00036 00037 void SeaBee3MainDisplayForm::setFwdVisionImage(Image<PixRGB<byte> > &img) 00038 { 00039 itsFwdVisionDisplay->setImage(img); 00040 } 00041 00042 void SeaBee3MainDisplayForm::setDwnVisionImage(Image<PixRGB<byte> > &img) 00043 { 00044 itsDwnVisionDisplay->setImage(img); 00045 } 00046 00047 void SeaBee3MainDisplayForm::setCompassImage(Image<PixRGB<byte> > &compassImage) 00048 { 00049 itsCompassImageDisplay->setImage(compassImage); 00050 } 00051 00052 void SeaBee3MainDisplayForm::setDepthImage(Image<PixRGB<byte> > &depthImage) 00053 { 00054 ItsDepthImageDisplay->setImage(depthImage); 00055 } 00056 00057 void SeaBee3MainDisplayForm::setPressureImage(Image<PixRGB<byte> > &pressureImage) 00058 { 00059 itsPressureImageDisplay->setImage(pressureImage); 00060 } 00061 00062 void SeaBee3MainDisplayForm::setDepthPIDImage(Image<PixRGB<byte> > &depthPIDImage) 00063 { 00064 itsDepthPIDImageDisplay->setImage(depthPIDImage); 00065 } 00066 00067 void SeaBee3MainDisplayForm::setAxesImages(Image<PixRGB<byte> > &heading, Image<PixRGB<byte> > &depth, Image<PixRGB<byte> > &strafe) 00068 { 00069 itsHeadingAxisImageDisplay->setImage(heading); 00070 itsDepthAxisImageDisplay->setImage(depth); 00071 itsStrafeAxisImageDisplay->setImage(strafe); 00072 } 00073 00074 void SeaBee3MainDisplayForm::setFwdRetinaMsgField(char f) 00075 { 00076 itsFwdRetinaMsgField->setText(toStr<int>(f)); 00077 } 00078 00079 void SeaBee3MainDisplayForm::setDwnRetinaMsgField(char f) 00080 { 00081 itsDwnRetinaMsgField->setText(toStr<int>(f)); 00082 } 00083 00084 void SeaBee3MainDisplayForm::setBeeStemMsgField(char f) 00085 { 00086 itsBeeStemMsgField->setText(toStr<int>(f)); 00087 } 00088 00089 void SeaBee3MainDisplayForm::setVisionMsgField(char f) 00090 { 00091 itsVisionMsgField->setText(toStr<int>(f)); 00092 } 00093 00094 void SeaBee3MainDisplayForm::setBeeStemData(BeeStemData &d) 00095 { 00096 itsCompassHeadingField->setText(toStr<int>(d.heading)); 00097 itsInternalPressureField->setText(toStr<int>(d.internalPressure)); 00098 itsExternalPressureField->setText(toStr<int>(d.externalPressure)); 00099 itsHeadingOutputField->setText(toStr<int>(d.headingPIDOutput)); 00100 itsDepthOutputField->setText(toStr<int>(d.depthPIDOutput)); 00101 00102 //TODO itsKillSwitchField->setPaletteForegroundColor() 00103 itsKillSwitchField->setText((d.killSwitch == true ) ? "ON" : "OFF"); 00104 } 00105 00106 00107 00108 void SeaBee3MainDisplayForm::updateBuoySegmentCheck( bool state ) 00109 { 00110 GUIComm->setOrangeSegEnabled(state); 00111 } 00112 00113 void SeaBee3MainDisplayForm::updateSalientPointCheck( bool state ) 00114 { 00115 GUIComm->setSalientPointsEnabled(state); 00116 }