#include "externalAppdialog.h"
#include "ui_externalAppdialog.h"
externalAppDialog
::externalAppDialog(QWidget *parent
) : ui(new Ui::externalAppDialog)
{
ui->setupUi(this);
this->setWindowFlags( Qt::FramelessWindowHint );
connect( this, SIGNAL( finished( int ) ), this, SLOT( deleteLater() ) );
this->showFullScreen();
activityTicker
= new QTimer( this );
connect( activityTicker, SIGNAL( timeout() ), this, SLOT( keepMainAppAlive() ) );
activityTicker->setInterval( (30 * 1000) ); //every 30s;
connect( systemCall, SIGNAL( finished(int) ), this, SLOT( accept() ) );
connect( systemCall, SIGNAL( finished(int) ), activityTicker, SLOT( stop() ) );
QTimer::singleShot( 0,
this,
SLOT( launchexternalAppApp
() ) );
}
externalAppDialog::~externalAppDialog()
{
delete ui;
}
void externalAppDialog::launchexternalAppApp( void )
{
systemCall
->start
( QString( "%1/%2" ) .arg( "externalAppPath" )
.arg( "externalApp" ),
<< "-qws" );
activityTicker->start();
}
void externalAppDialog::keepMainAppAlive( void )
{
}
#include "externalAppdialog.h"
#include "ui_externalAppdialog.h"
externalAppDialog::externalAppDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::externalAppDialog)
{
ui->setupUi(this);
this->setWindowFlags( Qt::FramelessWindowHint );
connect( this, SIGNAL( finished( int ) ), this, SLOT( deleteLater() ) );
this->showFullScreen();
activityTicker = new QTimer( this );
connect( activityTicker, SIGNAL( timeout() ), this, SLOT( keepMainAppAlive() ) );
activityTicker->setInterval( (30 * 1000) ); //every 30s;
systemCall = new QProcess( this );
connect( systemCall, SIGNAL( finished(int) ), this, SLOT( accept() ) );
connect( systemCall, SIGNAL( finished(int) ), activityTicker, SLOT( stop() ) );
QTimer::singleShot( 0, this, SLOT( launchexternalAppApp() ) );
}
externalAppDialog::~externalAppDialog()
{
delete ui;
}
void externalAppDialog::launchexternalAppApp( void )
{
systemCall->start( QString( "%1/%2" )
.arg( "externalAppPath" )
.arg( "externalApp" ),
QStringList()
<< "-qws" );
activityTicker->start();
}
void externalAppDialog::keepMainAppAlive( void )
{
qApp->postEvent( this, new QEvent( QEvent::MouseMove ) );
}
To copy to clipboard, switch view to plain text mode
Bookmarks