📄 movie.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file 'Movie.ui'**** Created: 一 3月 31 16:40:06 2008** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.5 edited Aug 31 12:13 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "Movie.h"#include <qvariant.h>//#include <qframe.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include <qprocess.h>#include <qstring.h>#include <qmessagebox.h>/* * Constructs a Play_Movie as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */Play_Movie::Play_Movie( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ){ if ( !name ) setName( "Play_Movie" ); setMinimumSize( QSize( 640, 480 ) ); setMaximumSize( QSize( 640, 480 ) ); languageChange(); resize( QSize(640, 480).expandedTo(minimumSizeHint()) ); //clearWState( WState_Polished ); //-------------------------------------------------- widget = new QWidget( 0,"qt" ); QMessageBox::information(this,"qt",QString::number((long) (this->winId()) ), "info"); QProcess proc; /*QStringList args; args<<"mplayer"<<" -fs "<<" -wid "<<QString::number( (int) (widget->winId()) )<< " -slave " << " -idle "<< "./123.rm"; proc.setArguments(args);*/ proc.addArgument("mplayer"); //proc.addArgument("-fs"); //proc.addArgument("-vf"); //proc.addArgument("scale=240:320"); proc.addArgument("-wid"); proc.addArgument( QString::number((long)(widget->winId())) ); proc.addArgument("-slave"); proc.addArgument("-quiet"); proc.addArgument("-idle"); //proc.addArgument("-input"); //proc.addArgument("file=FIFO"); proc.addArgument("123.rm"); if(!proc.start() ) QMessageBox::critical( 0, tr("Fatal error"), tr("Could not start the mplayer command."), tr("Quit") ); widget->show(); //widget->drawText(0,20,"QT kdslfkdslkfsd k"); }/* * Destroys the object and frees any allocated resources */Play_Movie::~Play_Movie(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void Play_Movie::languageChange(){ setCaption( tr( "Play Movie" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -