00001 /**************************************************************************** 00002 ** Form implementation generated from reading ui file 'Qt/BeoSubMappingQtMainForm.ui' 00003 ** 00004 ** 00005 ** WARNING! All changes made in this file will be lost! 00006 ****************************************************************************/ 00007 00008 #include "Qt/ui/BeoSubMappingQtMainForm.h" 00009 00010 #include <qvariant.h> 00011 #include <qimage.h> 00012 #include <qpixmap.h> 00013 #include <pthread.h> 00014 #include <dirent.h> 00015 #include <GL/gl.h> 00016 #include <GL/glu.h> 00017 #include <qpainter.h> 00018 #include <qlabel.h> 00019 #include <qpushbutton.h> 00020 #include <qlistbox.h> 00021 #include <qlineedit.h> 00022 #include <qlayout.h> 00023 #include <qtooltip.h> 00024 #include <qwhatsthis.h> 00025 #include "Raster/Raster.H" 00026 #include "QtUtil/ImageConvert.H" 00027 #include "Qt/poolimage.h" 00028 #include "Qt/BeoSubMappingQtMainForm.ui.h" 00029 00030 /* 00031 * Constructs a BeoSubMappingQtMainForm as a child of 'parent', with the 00032 * name 'name' and widget flags set to 'f'. 00033 * 00034 * The dialog will by default be modeless, unless you set 'modal' to 00035 * TRUE to construct a modal dialog. 00036 */ 00037 BeoSubMappingQtMainForm::BeoSubMappingQtMainForm( QWidget* parent, const char* name, bool modal, WFlags fl ) 00038 : QDialog( parent, name, modal, fl ) 00039 { 00040 if ( !name ) 00041 setName( "BeoSubMappingQtMainForm" ); 00042 00043 LabelLog = new QLabel( this, "LabelLog" ); 00044 LabelLog->setGeometry( QRect( 140, 10, 33, 20 ) ); 00045 00046 Log = new QLabel( this, "Log" ); 00047 Log->setGeometry( QRect( 20, 40, 300, 120 ) ); 00048 00049 save = new QPushButton( this, "save" ); 00050 save->setGeometry( QRect( 670, 530, 90, 80 ) ); 00051 00052 List = new QListBox( this, "List" ); 00053 List->setGeometry( QRect( 650, 200, 130, 300 ) ); 00054 List->setPaletteForegroundColor( QColor( 85, 0, 255 ) ); 00055 00056 LabelImage = new QLabel( this, "LabelImage" ); 00057 LabelImage->setGeometry( QRect( 390, 10, 48, 20 ) ); 00058 00059 poolImage = new PoolImage( this, "poolImage" ); 00060 poolImage->setGeometry( QRect( 20, 170, 600, 440 ) ); 00061 00062 displayCoord = new QLabel( this, "displayCoord" ); 00063 displayCoord->setGeometry( QRect( 20, 620, 590, 21 ) ); 00064 00065 LabelList = new QLabel( this, "LabelList" ); 00066 LabelList->setGeometry( QRect( 670, 151, 90, 40 ) ); 00067 00068 loadAS = new QPushButton( this, "loadAS" ); 00069 loadAS->setGeometry( QRect( 630, 60, 150, 30 ) ); 00070 00071 load = new QPushButton( this, "load" ); 00072 load->setGeometry( QRect( 630, 110, 150, 30 ) ); 00073 00074 restHeading = new QPushButton( this, "restHeading" ); 00075 restHeading->setGeometry( QRect( 10, 0, 100, 30 ) ); 00076 00077 test = new QLabel( this, "test" ); 00078 test->setGeometry( QRect( 490, 470, 120, 90 ) ); 00079 test->setBackgroundMode( QLabel::PaletteBackground ); 00080 test->setScaledContents( TRUE ); 00081 00082 displayImage = new QLabel( this, "displayImage" ); 00083 displayImage->setGeometry( QRect( 350, 40, 120, 90 ) ); 00084 displayImage->setBackgroundMode( QLabel::PaletteBackground ); 00085 displayImage->setScaledContents( TRUE ); 00086 00087 changeHeading = new QLineEdit( this, "changeHeading" ); 00088 changeHeading->setGeometry( QRect( 480, 133, 140, 23 ) ); 00089 00090 LabelImage_2 = new QLabel( this, "LabelImage_2" ); 00091 LabelImage_2->setGeometry( QRect( 480, 110, 140, 20 ) ); 00092 00093 refresh = new QPushButton( this, "refresh" ); 00094 refresh->setGeometry( QRect( 630, 10, 150, 30 ) ); 00095 00096 change2bottom = new QPushButton( this, "change2bottom" ); 00097 change2bottom->setGeometry( QRect( 470, 70, 150, 30 ) ); 00098 00099 change2front = new QPushButton( this, "change2front" ); 00100 change2front->setGeometry( QRect( 470, 40, 150, 30 ) ); 00101 00102 change2top = new QPushButton( this, "change2top" ); 00103 change2top->setGeometry( QRect( 470, 10, 150, 30 ) ); 00104 languageChange(); 00105 resize( QSize(800, 644).expandedTo(minimumSizeHint()) ); 00106 clearWState( WState_Polished ); 00107 00108 // signals and slots connections 00109 connect( List, SIGNAL( selectionChanged(QListBoxItem*) ), this, SLOT( displayLog() ) ); 00110 connect( refresh, SIGNAL( clicked() ), this, SLOT( refreshImages() ) ); 00111 connect( refresh, SIGNAL( clicked() ), this, SLOT( createIcon() ) ); 00112 connect( load, SIGNAL( clicked() ), this, SLOT( loadList() ) ); 00113 connect( save, SIGNAL( clicked() ), this, SLOT( saveiconList() ) ); 00114 connect( loadAS, SIGNAL( clicked() ), this, SLOT( LoadAngleScale() ) ); 00115 connect( restHeading, SIGNAL( clicked() ), this, SLOT( resetAllHeading() ) ); 00116 connect( changeHeading, SIGNAL( returnPressed() ), this, SLOT( changeTheHeading() ) ); 00117 connect( change2bottom, SIGNAL( clicked() ), this, SLOT( change_bottom() ) ); 00118 connect( change2front, SIGNAL( clicked() ), this, SLOT( change_front() ) ); 00119 connect( change2top, SIGNAL( clicked() ), this, SLOT( change_top() ) ); 00120 init(); 00121 } 00122 00123 /* 00124 * Destroys the object and frees any allocated resources 00125 */ 00126 BeoSubMappingQtMainForm::~BeoSubMappingQtMainForm() 00127 { 00128 // no need to delete child widgets, Qt does it all for us 00129 } 00130 00131 /* 00132 * Sets the strings of the subwidgets using the current 00133 * language. 00134 */ 00135 void BeoSubMappingQtMainForm::languageChange() 00136 { 00137 setCaption( tr( "BeoSubMappingQtMainForm" ) ); 00138 LabelLog->setText( tr( "<b>Log:</b>" ) ); 00139 Log->setText( QString::null ); 00140 save->setText( tr( "save" ) ); 00141 LabelImage->setText( tr( "<b>Image:</b>" ) ); 00142 displayCoord->setText( QString::null ); 00143 LabelList->setText( tr( "<b>List of images:</b>" ) ); 00144 loadAS->setText( tr( "Load angle and scale" ) ); 00145 load->setText( tr( "load" ) ); 00146 restHeading->setText( tr( "reset\n" 00147 "heading" ) ); 00148 test->setText( QString::null ); 00149 displayImage->setText( QString::null ); 00150 LabelImage_2->setText( tr( "change heading" ) ); 00151 refresh->setText( tr( "refresh" ) ); 00152 change2bottom->setText( tr( "bottom" ) ); 00153 change2front->setText( tr( "front" ) ); 00154 change2top->setText( tr( "top" ) ); 00155 } 00156