Esempio n. 1
0
void MadThread::run(){
	madWorker = new MadWorker();
	connect(&timer1,SIGNAL(timeout()),this,SLOT(stats()));

	qRegisterMetaType<QImage>("QImage&");
	connect(this,SIGNAL(startShooting()),madShooter,SLOT(makeScreenShoot()),Qt::QueuedConnection);
	connect(madWorker,SIGNAL(nextPlease()),madShooter,SLOT(makeScreenShoot()),Qt::QueuedConnection);
	connect(madShooter,SIGNAL(sendImage(QImage&,QImage&)),madWorker,SLOT(getImage(QImage&,QImage&)),Qt::QueuedConnection);
	connect(madWorker,SIGNAL(sendBuffer(QByteArray*)),madNet,SLOT(sendBuffer(QByteArray*)),Qt::QueuedConnection);	

	connect(madNet,SIGNAL(connectionStart(const QString &)),this,SLOT(startGrab()));
	connect(madNet,SIGNAL(connectionStart(const QString &)),&madTray,SLOT(connectionStarted(const QString &)));

	connect(&madTray,SIGNAL(stopWorking()),madShooter,SLOT(stopingWorking()));
	connect(&madTray,SIGNAL(stopWorking()),madWorker,SLOT(stopingWorking()));
	connect(&madTray,SIGNAL(stopWorking()),madNet,SLOT(stopingWorking()));
	connect(&madTray,SIGNAL(stopWorking()),this,SLOT(stopingWorking()));
	
	connect(madNet,SIGNAL(stopWorking()),&madTray,SLOT(stopingWorking()));
	connect(madNet,SIGNAL(stopWorking()),madWorker,SLOT(stopingWorking()));
	connect(madNet,SIGNAL(stopWorking()),madShooter,SLOT(stopingWorking()));
	connect(madNet,SIGNAL(stopWorking()),this,SLOT(stopingWorking()));
	
	exec();
}
Esempio n. 2
0
void TimeLapseWidget::setupConnections()
{
    connect(startButton, SIGNAL(clicked()), this, SLOT(startShooting()));
    connect(stopButton, SIGNAL(clicked()), this, SLOT(stopPressed()));
    connect(directoryButton, SIGNAL(clicked()), this, SLOT(setDirectory()));
    connect(saveDirectory, SIGNAL(textChanged(QString)), this, SLOT(saveDirectoryUpdated()));
    connect(attachedCameras, SIGNAL(currentIndexChanged(QString)), this, SLOT(attachedCameraSelectionChanged()));
}
void Boss::startShooting(float dt)
{
    if(GameLayer::isDie)
    {
        unschedule(schedule_selector(Boss::startShooting));
        return;
    }
    log("startShooting fd");
    startShooting();

}
Esempio n. 4
0
void BulletLayer::setBulletNumUp(){
	if (BulletNum < 3){
		this->BulletNum += 1;
		startShooting(BulletNum);
	}
}
Esempio n. 5
0
void MadThread::startGrab(){
	madWorker->stoped=false;
	madShooter->stoped=false;
	emit startShooting();
	timer1.start();
}