邢台学院信息科学与技术系嵌入式课程设计
musicButton->setPixmap(QPixmap::fromMimeSource(\
setupButton = new QPushButton( this, \ setupButton->setGeometry( QRect( 342, 110, 59, 59 ) );
setupButton->setPaletteBackgroundColor( QColor( 225, 225, 255 ) );
setupButton->setPixmap(QPixmap::fromMimeSource(\
timer = new QSpinBox(this, \
timer->setGeometry(QRect(285, 77, 29, 19)); timer->setValue( 5 );
reset = new QPushButton(this, \
reset->setGeometry(QRect(123, 220, 41, 41));
reset->setPaletteBackgroundColor( QColor( 210, 220, 255 ) );
reset->setPixmap( QPixmap::fromMimeSource( \出厂设置.png\
sure = new QPushButton(this, \
sure->setGeometry(QRect(292, 220, 41, 41));
sure->setPaletteBackgroundColor( QColor( 225, 225, 255 ) );
sure->setPixmap( QPixmap::fromMimeSource( \确定.png\
select = new QButtonGroup(this, \
select->setGeometry(QRect(190, 100, 100, 100));
select->setPaletteBackgroundColor( QColor( 210, 220, 255 ) ); select->setTitle(QString::null);
none = new QRadioButton(select, \ none->setGeometry(QRect(0, 0, 100, 21)); change = new QRadioButton(select, \ change->setGeometry(QRect(0, 20, 100, 21)); mosaic = new QRadioButton(select, \
mosaic[9]->setGeometry(QRect(0, 40, 100, 21)); updown = new QRadioButton(select, \ updown->setGeometry(QRect(0, 60, 100, 21)); leftright = new QRadioButton(select, \ leftright->setGeometry(QRect(0, 80, 100, 21));
none->setChecked(TRUE); onSureClick();
languageChange();
resize( QSize(480, 272).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished );
connect( photoButton, SIGNAL( clicked() ), this, SLOT( onPhotoClick() ) ); connect( setupButton, SIGNAL( clicked() ), this, SLOT( onSetupClick() ) );
connect( musicButton, SIGNAL( clicked() ), this, SLOT( onMusicClick() ) ); connect( sure, SIGNAL( clicked() ), this, SLOT( onSureClick() ) ); connect( reset, SIGNAL( clicked() ), this, SLOT( onResetClick() ) ); newWindowFlag = 0; photoWindowFlag = 0;
musicWindowFlag = 0; }
Welcome::~Welcome() { }
void Welcome::languageChange() {
setCaption( tr( \
none->setText(trUtf8( \
change->setText(trUtf8( \ mosaic->setText(trUtf8( \ updown->setText(trUtf8( \ leftright->setText(trUtf8( \}
photo.cpp
#include \#include
Photo::Photo( QWidget* parent, const char* name, bool modal, WFlags fl ) : Window( parent, name, modal, fl ) {
if ( !name )
setName( \
setMinimumSize( QSize( 480, 272 ) ); setMaximumSize( QSize( 480, 272 ) );
setPaletteBackgroundPixmap( QPixmap::fromMimeSource( \ countFile = new QLabel( this, \
countFile->setGeometry( QRect( 80, 245, 111, 21 ) );
countFile->setPaletteBackgroundColor( QColor( 117, 117, 117 ) ); sizePhoto = new QLabel( this, \
sizePhoto->setGeometry( QRect( 250, 245, 120, 20 ) );
sizePhoto->setPaletteBackgroundColor( QColor[10]( 117, 117, 117 ) );
邢台学院信息科学与技术系嵌入式课程设计
back = new QPushButton( this, \
back->setGeometry( QRect( 433, 202, 38, 38 ) );
back->setPaletteBackgroundColor( QColor( 225, 230, 170 ) );
back->setPixmap( QPixmap::fromMimeSource( \返回.png\ autoPlay = new QPushButton( this, \ autoPlay->setGeometry( QRect( 9, 203, 38, 38 ) );
autoPlay->setPaletteBackgroundColor( QColor( 225, 230, 170 ) );
autoPlay->setPixmap( QPixmap::fromMimeSource( \播放.png \ ) ); nextPhoto = new QPushButton(this, \
nextPhoto->setGeometry( QRect(433, 122, 38, 38) );
nextPhoto->setPaletteBackgroundColor( QColor( 220, 235, 255 ) );
nextPhoto->setPixmap( QPixmap::fromMimeSource( \ prePhoto = new QPushButton(this, \
prePhoto->setGeometry( QRect(9, 122, 38, 38) );
prePhoto->setPaletteBackgroundColor( QColor( 220, 235, 255 ) );
prePhoto->setPixmap( QPixmap::fromMimeSource( \ showContent = new NIconView( this, \ showContent->setGeometry( QRect( 53, 60, 375, 180 ) ); showContent->setAutoArrange (true); showContent->setSorting (true);
QPixmap *backGround = new QPixmap(\ showContent->setPaletteBackgroundPixmap(*backGround); path = PATH_STRING; languageChange();
resize( QSize(480, 272).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished );
photoMenu = new QIconView(this, \ photoMenu->setGeometry(0, 222, 480, 50); photoMenu->hide();
secondMenu = new QIconView(this, \ secondMenu->setGeometry[11](70, 182, 170, 40); secondMenu->hide();
thirdMenu = new QIconView(this, \ thirdMenu->setGeometry(40, 182, 300, 40); thirdMenu->hide();
pro = new QProgressBar(this, \ pro->setGeometry(QRect(0, 0, 480, 20));
pro->setPaletteForegroundColor(QColor(136, 157, 211)); pro->setProgress(100);
Dt = new DateAndTime(this, 0, Qt::WStyle_Customize |Qt::WStyle_NoBorder); Dt->setGeometry(360,0,120,70); Dt->hide(); /*菜单内容*/
QIconViewItem *tmpItem;
tmpItem = new QIconViewItem(photoMenu,\
tmpItem = new QIconViewItem(photoMenu,\ tmpItem = new QIconViewItem(photoMenu,\
tmpItem = new QIconViewItem(photoMenu,\ tmpItem = new QIconViewItem(photoMenu,\ tmpItem = new QIconViewItem(photoMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(secondMenu,\ tmpItem = new QIconViewItem(thirdMenu,\正常\ tmpItem = new QIconViewItem(thirdMenu,\飞入\ tmpItem = new QIconViewItem(thirdMenu,\挤压\ tmpItem = new QIconViewItem(thirdMenu,\展开\
tmpItem = new QIconViewItem(thirdMenu,\图片马赛克\ tmpItem = new QIconViewItem(thirdMenu,\百叶窗\ tmpItem = new QIconViewItem(thirdMenu,\缩放\ tmpItem = new QIconViewItem(thirdMenu,\棋盘\ tmpItem = new QIconViewItem(thirdMenu,\随机\ /*菜单内容*/ menuFlag = 0; timeFlag = 0; lock = 0; flag = 0;
showPhotoWindowFlag=0; Val = READ_VAL;
autoPlay->setFocus(); refreshView();
connect(photoMenu,SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT(onMenuItemClick(QIconViewItem*)));
connect(showContent, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT(onShowItemClick(QIconViewItem*)));
connect(secondMenu, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT(onSecondItemClick(QIconViewItem*)));
connect(thirdMenu, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT(onThirdItemClick(QIconViewItem*)));
connect(nextPhoto, SIGNAL(clicked()), this, SLOT(onNextPhotoClick())); connect(prePhoto, SIGNAL(clicked()), this, SLOT(onPrePhotoClick())); connect( back, SIGNAL( clicked() ), this, SLOT( onBack() ) );
connect( autoPlay, SIGNAL( clicked() ), this, SLOT( onAutoPlay() ) );
connect( showContent, SIGNAL( currentChanged(QIconViewItem*) ), this, SLOT( curChanged() ) );
}
Photo::~Photo()
邢台学院信息科学与技术系嵌入式课程设计
{ }
void Photo::languageChange() {
setCaption( tr( \}
5.3在主机上运行
#qmake –project #qmake #make #./photo
运行界面如下图5-3所示:
图5-3 主机显示效果
5.4交叉编译生成目标文件
使用前期搭建好的交叉环境,交叉工具链已经安装完毕,使用其中编译工具即可: #arm-Linux-g++
5.5在目标板上运行
使用secureCRT终端工具烧入镜像,然后运行,效果如图5-4和5-5所示。
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库数码相框设计与实现 - 图文(6)在线全文阅读。
相关推荐: