Exemplo n.º 1
0
//Actions for the buttons
void DocumentWidget::createActions()
{
    connect(m_closeButton, SIGNAL(clicked()), this, SLOT(closeFile()));
    connect(m_reviewButton, SIGNAL(clicked()), this, SLOT(showReview()));
    connect(m_hideReview, SIGNAL(clicked()), this, SLOT(hideReview()));
    connect(m_submitReview, SIGNAL(clicked()), this, SLOT(submitReview()));
    connect(m_slider, SIGNAL(valueChanged(int)), m_box, SLOT(setValue(int)));
    connect(m_box, SIGNAL(valueChanged(int)), m_slider, SLOT(setValue(int)));
    connect(m_reportButton, SIGNAL(clicked()), this, SLOT(showReport()));
    connect(m_clearReport, SIGNAL(clicked()), this, SLOT(clearReport()));
    connect(m_hideReport, SIGNAL(clicked()), this, SLOT(hideReport()));
    connect(m_submitReport, SIGNAL(clicked()), this, SLOT(submitReport()));
    connect(m_timer, SIGNAL(timeout()), this, SLOT(s_counter()));
    connect(m_timer, SIGNAL(timeout()), m_parent, SLOT(s_updateCredit()));
    connect(m_clearReview, SIGNAL(clicked()), this, SLOT(clearReview()));
    connect(m_searchButton, SIGNAL(clicked()), this, SLOT(s_search()));
}
Exemplo n.º 2
0
void ServerController::processClient(sf::Packet &packet, sf::TcpSocket &client)
{
	std::string protocol;
		
	packet >> protocol;
		
	std::cout << "Interpreting Packet Protocol: " << protocol << std::endl;
		
	if(protocol=="LOGIN"){
		loginAccount(packet, client);
	}
	else if(protocol=="REGISTER"){
		registerAccount(packet, client);
	}
	else if(protocol=="CONFERENCE_LIST"){
		getConferences(packet, client);
	}
	else if(protocol=="CONFERENCE_ACCESS"){
		getAccess(packet, client);
	}
	else if(protocol=="VIEW_SUBMISSIONS"){
		getSubmissions(packet, client);
	}
	else if(protocol=="SUBMIT_PAPER"){
		paperSubmission(packet, client);
	}
	else if (protocol=="ADMIN_STATUS"){
		getAdminStatus(packet, client);
	}
	else if (protocol=="CREATE_CONFERENCE"){
		createConference(packet, client);
	}
	else if (protocol=="GET_NOTIFICATIONS"){
		getNotifications(packet, client);
	}
	else if (protocol=="CHECK_PHASE"){
		checkPhase(packet, client);
	}
	else if (protocol=="BID_LIST"){
		bidList(packet, client);
	}
	else if (protocol=="BID_PAPER"){
		bidPaper(packet, client);
	}
	else if (protocol=="ADVANCE_PHASE"){
		advancePhase(packet, client);
	}
	else if(protocol=="BYE"){
		logoutUser(packet, client);
	}
	else if(protocol=="GET_ALLOCATIONS"){
		getAllocations(packet, client);
	}
	else if(protocol=="CONFERENCE_SUBMISSIONS"){
		getConferenceSubs(packet, client);
	}
	else if(protocol=="REVIEW_LIST"){
		getReviewList(packet, client, true);
	}
	else if (protocol=="SUB_DETAIL"){
		sendSubDetail(packet, client);
	}
	else if (protocol=="SUBMIT_REVIEW"){
		submitReview(packet, client);
	}
	else if (protocol=="GET_COMMENTS"){
		getComments(packet, client);
	}
	else if (protocol=="SEND_COMMENT"){
		sendComments(packet, client);
	}
	else if (protocol=="ADD_REVIEWER"){
		addMember(packet, client, Account::Access_Reviewer);
	}
	else if (protocol=="ADD_AUTHOR"){
		addMember(packet, client, Account::Access_Author);
	}
	else if (protocol=="CHANGE_MAX_ALLOCATED_CONF"){
		changeLimit(packet, client, "ALLOCATED");
	}
	else if (protocol=="CHANGE_MAX_PAPERREVIEWERS_CONF"){
		changeLimit(packet, client, "PAPERREV");
	}
	else if (protocol=="GET_MAX_ALLOCATED_CONF"){
		getLimit(packet, client, "ALLOCATED");
	}
	else if (protocol=="GET_MAX_PAPERREVIEWERS_CONF"){
		getLimit(packet, client, "PAPERREV");
	}
	else if (protocol=="GET_FULLNAME"){
		getAccountName(packet, client);
	}
	else if (protocol=="VIEW_REVIEW"){
		getReview(packet, client);
	}
	else if (protocol=="NOTIFY_COUNT"){
		checkNotifyCount(packet, client);
	}
	else if (protocol=="APPROVE_PAPER"){
		decidePaper(packet, client, true);
	}
	else if (protocol=="REJECT_PAPER"){
		decidePaper(packet, client, false);
	}
	else if (protocol=="MY_REVIEWS"){
		getReviewList(packet, client, false);
	}
	else if (protocol=="DID_REVIEW"){
		checkReviewed(packet, client);
	}
	else if (protocol=="FINAL_REVIEW"){
		getFinalReview(packet, client);
	}
	else if (protocol=="CONF_REVIEWERS"){
		getReviewers(packet, client);
	}
	else if (protocol=="CONF_SUBMISSIONS"){
		getConfSubmissions(packet, client);
	}
	else if (protocol=="FILLED_ALLOCATION"){
		checkPaperAlloc(packet, client);
	}
	else if (protocol=="GET_FREE_REVIEWERS"){
		getFreeReviewers(packet, client);
	}
	else if (protocol=="ASSIGN_REVIEWER"){
		assignReviewer(packet, client);
	}
	else if (protocol=="CHANGE_PASSWORD"){
		changePassword(packet, client);
	}
	else {
		std::cout << "Unrecognised protocol" << std::endl;
	}
}