void MainWindow::on_loginAct_triggered() { login = new Login_ui(this); connect (login,SIGNAL(authorise(QByteArray)),this,SIGNAL(authorise(QByteArray))); connect (login,SIGNAL(cancle_login()),this,SLOT(del_login())); ui->loginAct->setEnabled (false); connect(login,SIGNAL(rejected()),this,SLOT(disable_all())); login->show (); }
void overlay_loop() { slothSock sock; bool discon = false; std::string cid; std::wstring clientname; std::vector<std::wstring> name_list; std::vector<bool> talking_list; std::vector<std::string> schandlerid; while(true) { while(pause) { psleep(200); } //clear vectors name_list.clear(); talking_list.clear(); schandlerid.clear(); if(get_TS3_enabled()) { //blog(LOG_WARNING, "connect"); if(connect(sock, discon) == 0) { //blog(LOG_WARNING, "authorise"); if(authorise(sock, discon) == 0) { if(discon) { discon = false; } //Get Channel client list and talking state //blog(LOG_WARNING, "get_cid"); if(get_cid(sock, cid) == 0) { //blog(LOG_WARNING, "get_channelclientlist"); get_channelclientlist(sock, cid, name_list, talking_list); //names = name_list; //talking = talking_list; } //get own name //blog(LOG_WARNING, "get_schandlerid"); if(get_schandlerid(sock, schandlerid) == 0) { //blog(LOG_WARNING, "notifyregister"); if(notifyregister(sock, schandlerid[0]) == 0) { //blog(LOG_WARNING, "clientname_from_uid"); clientname_from_uid(sock, clientname); own_name = clientname; } } } sock.closeConnection(); } } names = name_list; talking = talking_list; psleep(200); } return; }