BeoSubQtMainForm.h
00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BEOSUBQT_H
00009 #define BEOSUBQT_H
00010
00011 #include <qvariant.h>
00012 #include <qdialog.h>
00013 #include "Component/ModelManager.H"
00014 #include "BeoSub/BeoSubOneBal.H"
00015 #include "Util/StringConversions.H"
00016 #include "Util/Angle.H"
00017 #include "Devices/JoyStick.H"
00018 #include "Parallel/pvisionTCP-defs.H"
00019 #include "Beowulf/Beowulf.H"
00020 #include "BeoSub/ColorTracker.H"
00021 #include "BeoSub/BeoSubTaskDecoder.H"
00022 #include "BeoSub/BeoSubCanny.H"
00023 #include "BeoSub/CannyModel.H"
00024 #include "BeoSub/BeoSubDB.H"
00025 #include "SIFT/VisualObject.H"
00026 #include "SIFT/VisualObjectDB.H"
00027 #include "SIFT/Keypoint.H"
00028
00029 class QVBoxLayout;
00030 class QHBoxLayout;
00031 class QGridLayout;
00032 class QSpacerItem;
00033 class QLabel;
00034 class QPushButton;
00035 class QScrollBar;
00036 class QRadioButton;
00037 class QLineEdit;
00038
00039 class BeoSubQtMainForm : public QDialog
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 BeoSubQtMainForm( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
00045 ~BeoSubQtMainForm();
00046
00047 QLabel* bottomfilename;
00048 QPushButton* saveDown;
00049 QLabel* frontfilename;
00050 QPushButton* saveFront;
00051 QPushButton* saveUp;
00052 QLabel* topfilename;
00053 QLabel* textLabel2_2_2_2;
00054 QLabel* TsDisplay;
00055 QScrollBar* DiveScroll;
00056 QScrollBar* FrontBScroll;
00057 QLabel* textLabel2_2_2;
00058 QLabel* FrontBDisplay;
00059 QLabel* LineEdit12;
00060 QScrollBar* TsScroll;
00061 QLabel* BsDisplay;
00062 QLabel* textLabel2_2_2_3;
00063 QScrollBar* RearBScroll;
00064 QScrollBar* OrientScroll;
00065 QLabel* LTDisplay;
00066 QLabel* textLabel2_2;
00067 QLabel* LineEdit16;
00068 QScrollBar* RTScroll;
00069 QScrollBar* LTScroll;
00070 QLabel* TiltDisplay;
00071 QLabel* RTDisplay;
00072 QLabel* RearBDisplay;
00073 QLabel* TurnDisplay;
00074 QLabel* Label_2;
00075 QLabel* textLabel3;
00076 QLabel* textLabel2;
00077 QLabel* textLabel3_2;
00078 QLabel* textLabel1;
00079 QLabel* ImagePixmapLabel1;
00080 QLabel* LineEdit2_2;
00081 QLabel* LineEdit1;
00082 QLabel* LineEdit2;
00083 QLabel* LineEdit3_2;
00084 QLabel* LineEdit4;
00085 QLabel* LineEdit3;
00086 QLabel* LineEdit1_2;
00087 QLabel* LineEdit4_2;
00088 QLabel* Label_1_2;
00089 QLabel* Label_1_2_2_2;
00090 QLabel* Label_1_2_2;
00091 QLabel* LineEdit11;
00092 QLabel* textLabel11;
00093 QLabel* LineEdit15;
00094 QLabel* textLabel15;
00095 QLabel* textLabel16;
00096 QLabel* textLabel12;
00097 QScrollBar* PitchScroll;
00098 QRadioButton* PitchPID;
00099 QRadioButton* HeadingPID;
00100 QRadioButton* KILL;
00101 QRadioButton* DepthPID;
00102 QLabel* LineEdit11_2_2;
00103 QPushButton* ButtonStop;
00104 QLabel* ImagePixmapLabel2;
00105 QLabel* LabelTaskControl_2;
00106 QLabel* CPUtemp;
00107 QLineEdit* lineEditAdvance;
00108 QLineEdit* lineEditStrafe;
00109 QPushButton* resetA;
00110 QPushButton* GetDirections;
00111 QLabel* textLabel12_2_2;
00112 QPushButton* ButtonTaskB;
00113 QPushButton* ButtonDecode;
00114 QPushButton* ButtonTaskC;
00115 QLabel* LabelTaskControl;
00116 QPushButton* ButtonTaskA;
00117 QLineEdit* DepthD;
00118 QLineEdit* DepthP;
00119 QLabel* LineEdit11_2_3;
00120 QLineEdit* PitchD;
00121 QLineEdit* DepthI;
00122 QLineEdit* PitchI;
00123 QLineEdit* PitchP;
00124 QLabel* LineEdit11_2_3_2;
00125 QLineEdit* HeadingI;
00126 QLineEdit* HeadingP;
00127 QLabel* LineEdit11_2_3_3;
00128 QLineEdit* HeadingD;
00129 QLabel* LineEdit11_2;
00130 QLabel* LineEdit11_2_2_2;
00131 QLabel* LineEdit11_2_2_2_2;
00132 QLabel* LabelTaskControl_2_2;
00133 QLabel* indicator;
00134 QLabel* textLabel12_2;
00135 QLabel* textLabel12_2_3;
00136 QPushButton* ButtonGate;
00137 QPushButton* ButtonPic;
00138 QLineEdit* to;
00139 QLabel* ImagePixmapLabel3;
00140
00141 bool joyflag;
00142 nub::soft_ref<Beowulf> itsBeo;
00143 TCPmessage smsg;
00144 TCPmessage rmsg;
00145 int counterDown;
00146 int counterFront;
00147 int counterUp;
00148 nub::soft_ref<BeoSubOneBal> itsSub;
00149 Image< PixRGB<byte> > imup;
00150 Image< PixRGB<byte> > imfront;
00151 Image< PixRGB<byte> > imdown;
00152 nub::soft_ref<BeoSubTaskDecoder> itsDecoder;
00153 nub::soft_ref<ColorTracker> itsTracker1;
00154 nub::soft_ref<ColorTracker> itsTracker2;
00155 nub::soft_ref<BeoSubCanny> itsDetector;
00156 bool takePic;
00157
00158 public slots:
00159 virtual void init( const nub::soft_ref<BeoSubOneBal> & sub, const nub::soft_ref<Beowulf> & beo, const nub::soft_ref<BeoSubTaskDecoder> & decoder, const nub::soft_ref<ColorTracker> & tracker1, const nub::soft_ref<ColorTracker> & tracker2, const nub::soft_ref<BeoSubCanny> & detector );
00160 virtual void togglePic();
00161 virtual void savePIDvalue();
00162 virtual void HeadingPID_toggled();
00163 virtual void PitchPID_toggled();
00164 virtual void DepthPID_toggled();
00165 virtual void KILL_toggled();
00166 virtual void turnopen_return();
00167 virtual void advance_return();
00168 virtual void strafe_return();
00169 virtual void resetAtt_return();
00170 virtual void FrontBallast_valueChanged( int val );
00171 virtual void RearBallast_valueChanged( int val );
00172 virtual void LThruster_valueChanged( int val );
00173 virtual void RThuster_valueChanged( int val );
00174 virtual void Thrusters_valueChanged( int val );
00175 virtual void dive_valueChanged( int val );
00176 virtual void Orient_valueChanged( int val );
00177 virtual void Pitch_valueChanged( int val );
00178 virtual void timerEvent( QTimerEvent * e );
00179 virtual void saveImageLog( const char * name, int count );
00180 virtual void saveImageUp();
00181 virtual void saveImageFront();
00182 virtual void saveImageDown();
00183 virtual void taskGate();
00184 virtual void taskDecode();
00185 virtual void taskA();
00186 virtual void taskB();
00187 virtual void taskC();
00188 virtual void stopAll();
00189 virtual void matchAndDirect();
00190 virtual void parseMessage( TCPmessage & rmsg );
00191 virtual void displayFunc();
00192 virtual void keyPressEvent( QKeyEvent * event );
00193 virtual void keyReleaseEvent( QKeyEvent * event );
00194
00195 protected:
00196 int newVariable;
00197 ModelManager manager;
00198 pthread_t IMU_thread;
00199 std::list<std::string> topFiles;
00200 std::list<std::string> frontFiles;
00201 std::list<std::string> bottomFiles;
00202
00203
00204 protected slots:
00205 virtual void languageChange();
00206
00207 private:
00208 FILE *savePIDgain;
00209 uint i;
00210
00211 };
00212
00213 #endif // BEOSUBQT_H