ImageQtMainForm.cpp

00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'Qt/ImageQtMainForm.ui'
00003 **
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 ****************************************************************************/
00007 
00008 #include "Qt/ui/ImageQtMainForm.h"
00009 
00010 #include <qvariant.h>
00011 #include <qfiledialog.h>
00012 #include <qlineedit.h>
00013 #include <qimage.h>
00014 #include <qpixmap.h>
00015 #include <qmessagebox.h>
00016 #include <qpushbutton.h>
00017 #include <qlabel.h>
00018 #include <qcheckbox.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 #include <qimage.h>
00023 #include <qpixmap.h>
00024 
00025 #include "Raster/Raster.H"
00026 #include "QtUtil/ImageConvert.H"
00027 #include "Qt/ImageQtMainForm.ui.h"
00028 /*
00029  *  Constructs a ImageQtMainForm as a child of 'parent', with the
00030  *  name 'name' and widget flags set to 'f'.
00031  *
00032  *  The dialog will by default be modeless, unless you set 'modal' to
00033  *  TRUE to construct a modal dialog.
00034  */
00035 ImageQtMainForm::ImageQtMainForm( QWidget* parent, const char* name, bool modal, WFlags fl )
00036     : QDialog( parent, name, modal, fl )
00037 {
00038     if ( !name )
00039         setName( "ImageQtMainForm" );
00040 
00041     ChooseButton = new QPushButton( this, "ChooseButton" );
00042     ChooseButton->setGeometry( QRect( 40, 90, 140, 31 ) );
00043 
00044     ImageLoadButton = new QPushButton( this, "ImageLoadButton" );
00045     ImageLoadButton->setGeometry( QRect( 230, 90, 140, 31 ) );
00046 
00047     ImageFileLineEdit = new QLineEdit( this, "ImageFileLineEdit" );
00048     ImageFileLineEdit->setGeometry( QRect( 20, 40, 370, 24 ) );
00049 
00050     ImageFileTextLabel = new QLabel( this, "ImageFileTextLabel" );
00051     ImageFileTextLabel->setGeometry( QRect( 20, 10, 90, 21 ) );
00052 
00053     FullSizeBox = new QCheckBox( this, "FullSizeBox" );
00054     FullSizeBox->setGeometry( QRect( 190, 140, 210, 31 ) );
00055 
00056     DisplayButton = new QPushButton( this, "DisplayButton" );
00057     DisplayButton->setGeometry( QRect( 40, 140, 140, 31 ) );
00058 
00059     ImagePixmapLabel = new QLabel( this, "ImagePixmapLabel" );
00060     ImagePixmapLabel->setGeometry( QRect( 50, 200, 320, 240 ) );
00061     ImagePixmapLabel->setScaledContents( TRUE );
00062     languageChange();
00063     resize( QSize(411, 465).expandedTo(minimumSizeHint()) );
00064     clearWState( WState_Polished );
00065 
00066     // signals and slots connections
00067     connect( ChooseButton, SIGNAL( clicked() ), this, SLOT( setImageFile() ) );
00068     connect( DisplayButton, SIGNAL( clicked() ), this, SLOT( displayImage() ) );
00069     connect( ImageLoadButton, SIGNAL( clicked() ), this, SLOT( loadImage() ) );
00070 }
00071 
00072 /*
00073  *  Destroys the object and frees any allocated resources
00074  */
00075 ImageQtMainForm::~ImageQtMainForm()
00076 {
00077     // no need to delete child widgets, Qt does it all for us
00078 }
00079 
00080 /*
00081  *  Sets the strings of the subwidgets using the current
00082  *  language.
00083  */
00084 void ImageQtMainForm::languageChange()
00085 {
00086     setCaption( tr( "test-ImageQt" ) );
00087     ChooseButton->setText( tr( "Choose File..." ) );
00088     ImageLoadButton->setText( tr( "Load" ) );
00089     ImageFileTextLabel->setText( tr( "Image file:" ) );
00090     FullSizeBox->setText( tr( "full-size (another window)" ) );
00091     DisplayButton->setText( tr( "Display" ) );
00092 }
00093 
Generated on Sun May 8 08:41:15 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3