snifer

基于ADI的Blackfin ADSP-BF592的电子显微镜系统-主体框架设计

0
阅读(2483)

基于ADI的Blackfin ADSP-BF592的电子显微镜系统主窗体界面测试通过,鼓个掌

#include "cameraform.h"

#include

#include

#include

#include

#include

#include

/*

* Constructs a cameraform as a child of 'parent', with the

* name 'name' and widget flags set to 'f'.

*

* The dialog will by default be modeless, unless you set 'modal' to

* TRUE to construct a modal dialog.

*/

cameraform::cameraform( QWidget* parent, const char* name, bool modal, WFlags fl )

: QDialog( parent, name, modal, fl )

{

if ( !name )

setName( "cameraform" );

btnExit = new QPushButton( this, "btnExit" );

btnExit->setGeometry( QRect( 180, 260, 40, 40 ) );

btnCamera = new QPushButton( this, "btnCamera" );

btnCamera->setGeometry( QRect( 50, 260, 40, 40 ) );

pushButton5 = new QPushButton( this, "pushButton5" );

pushButton5->setGeometry( QRect( 240, 310, 41, 31 ) );

picCamera = new QLabel( this, "picCamera" );

picCamera->setGeometry( QRect( 20, 20, 280, 220 ) );

picCamera->setScaledContents( FALSE );

picCamera->setAlignment( int( QLabel::AlignCenter ) );

languageChange();

resize( QSize(319, 304).expandedTo(minimumSizeHint()) );

// signals and slots connections

connect( btnExit, SIGNAL( clicked() ), this, SLOT( close() ) );

}

/*

* Destroys the object and frees any allocated resources

*/

cameraform::~cameraform()

{

// no need to delete child widgets, Qt does it all for us

}

/*

* Sets the strings of the subwidgets using the current

* language.

*/

void cameraform::languageChange()

{

setCaption( tr( "USB Camera" ) );

btnExit->setText( tr( "Exit" ) );

pushButton5->setText( tr( "screenshot" ) );

btnCamera->setText(tr( "magnify" ) );

}

Baidu
map