Esempio n. 1
0
void TaskEditor::refreshFromServer(){
    ServerCommand *command =new ServerCommand(this);
    command->set("command","getTask");
    command->set("taskID",this->store.get("id","").asCString());
    this->connect(command,SIGNAL(saveComplete(Json::Value)),this,SLOT(refreshFromServerComplete(Json::Value)));
    this->connect(command,SIGNAL(saveComplete(Json::Value)),command,SLOT(deleteLater()));
    command->send();
}
Esempio n. 2
0
void TaskEditor::save(){


    this->updateStore();

    if(this->store["id"].asString()==""){
        this->store["command"]="addTask";
    }else{
        this->store["command"]="editTask";
    }
    ServerCommand *command = new ServerCommand(this->store,0);
    connect(command, SIGNAL(saveComplete(Json::Value)), command, SLOT(deleteLater()));
    command->send();
    connect(command, SIGNAL(saveComplete(Json::Value)), this, SLOT(saveCompleted(Json::Value)));
    qDebug()<<"saved.";
}
Esempio n. 3
0
void TaskEditor::setStore(Json::Value &s, bool getNotes){
    this->store=s;
    //remove all notes
    while(this->notes.length()){
        this->notes.takeFirst()->deleteLater();
    }
    if(this->store.get("id","")!="" && getNotes){
        ServerCommand *command =new ServerCommand(this);
        command->set("command","getTaskNotes");
        command->set("taskID",this->store.get("id","").asCString());
        this->connect(command,SIGNAL(saveComplete(Json::Value)),this,SLOT(getNotesResponse(Json::Value)));
        this->connect(command,SIGNAL(saveComplete(Json::Value)),command,SLOT(deleteLater()));
        command->send();
    }
    this->updateFromStore();
}
Esempio n. 4
0
void SaveMemoryThread::run()
{
    //QMutex mutex;
    qDebug() << "Started!";
    memory->saveMemory(filePath,segmentsToLoad);
    emit saveComplete();
    qDebug() << "Done :)\n";
}
Esempio n. 5
0
void ServerCommand::saveComplete(QNetworkReply *reply){
    Json::Reader reader;
    Json::Value root;
    QString r = reply->readAll();
    qDebug()<<"Server Response: "<<r;
    reader.parse(r.toStdString(),root);
    emit saveComplete(root);
}
Esempio n. 6
0
void TaskEditor::saveCompleted(Json::Value val){
    //this->close();
    if(val.get("taskID","")!=""){
        this->store["id"]=val.get("taskID","");
    }
    this->saveNotes();
    emit saveComplete();
    this->refreshFromServer();
}
void Utility::Yuv422FileSaver::saveP() {
	isRunning_=true;
	if(compression_==Compression::PACKED) {
		savePacked();
	} else if(compression_==Compression::PLANAR) {
		savePlanar();
	} else {
		isRunning_=false;
		throw std::logic_error("Should not get here");
	}
	bool buffer=isRunning_;
	isRunning_=false;
	emit saveComplete(buffer,QFileInfo(file_).fileName(),video_->getWidth(),video_->getHeight());
}
Esempio n. 8
0
void KNLibImageBuffer::saveImage()
{
    m_imageCache.save(m_albumArtFolder+m_hash+".png", "PNG");
    emit saveComplete();
}