Example #1
0
bool InteractiveCommand::execute(SceneWindow *win, PlotComponent *component) {
    this->_window = win;
    component = NULL;
    
    QAction *action = new QAction(QString("&Continue"), NULL);

    action->moveToThread(QApplication::instance()->thread());
    this->moveToThread(QApplication::instance()->thread());
       
    this->_window->addWindowAction(action);
    
    

    QObject::connect(win, SIGNAL(continueClient()), this, SLOT(letClientGo()), Qt::QueuedConnection);
    QObject::connect(action, SIGNAL(triggered()), this, SLOT(letClientGo()), Qt::QueuedConnection);
    
    
    
    this->holdClient();

    QObject::disconnect(win, SIGNAL(continueClient()), this, SLOT(letClientGo()));
    QObject::disconnect(action, SIGNAL(triggered()), this, SLOT(letClientGo()));
    
    this->_window->removeWindowAction(action);
    delete action;
    
    //Debug("selecting points");
    return true;
}
Example #2
0
void Client::continueWork(pollfd *ufds) {
	if(!alive()) {
		return;
	}
	if(client != NULL && client->isOpen() && client->getSocket() == ufds->fd && ufds->revents != 0) {
		continueClient(ufds);
		return;
	}
	if(remote != NULL && remote->isOpen() && remote->getSocket() == ufds->fd && ufds->revents != 0) {
		continueRemote(ufds);
	}
}