BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; if (KEY_RETURN == key) { onSendMsg(); handled = TRUE; // Close talk panels on hitting return // without holding a modifier key if (mask == MASK_NONE) closeIfNotPinned(); } else if (KEY_ESCAPE == key && mask == MASK_NONE) { handled = TRUE; gFocusMgr.setKeyboardFocus(NULL); // Close talk panel with escape closeIfNotPinned(); } // May need to call base class LLPanel::handleKeyHere if not handled // in order to tab between buttons. JNC 1.2.2002 return handled; }
//public: OClientPeer::OClientPeer(QTcpSocket *connect):OAbstractPeer(ClientPeer,connect) { } void OClientPeer::init() { connect(this,SIGNAL(onLogin(QString,QString,QVector<int>,bool,bool,bool)),this,SLOT(onLogin(QString,QString,QVector<int>,bool,bool,bool))); connect(this,SIGNAL(onAskInfo(QStringList)),this,SLOT(onAskInfo(QStringList))); connect(this,SIGNAL(onAskPublicKey()),this,SLOT(onAskPublicKey())); connect(this,SIGNAL(onAskUserList(QString,QString,bool)),this,SLOT(onAskUserList(QString,QString,bool))); connect(this,SIGNAL(onModifyUserList(QString,QString,QString,QString)),this,SLOT(onModifyUserList(QString,QString,QString,QString))); connect(this,SIGNAL(onState(QString)),this,SLOT(onState(QString))); connect(this,SIGNAL(onLogout()),this,SLOT(onLogout())); connect(this,SIGNAL(onSendMsg(QString,QString)),this,SLOT(onSendMsg(QString,QString))); connect(this,SIGNAL(onUserRequest(QString,QString)),this,SLOT(onUserRequest(QString,QString))); connect(this,SIGNAL(onRequestResult(int,QString)),this,SLOT(onRequestResult(int,QString))); connect(this,SIGNAL(onModifyGroup(QString,QString,QStringList)),this,SLOT(onModifyGroup(QString,QString,QStringList))); connect(this,SIGNAL(onAskUserInfo(QString,QStringList)),this,SLOT(onAskUserInfo(QString,QStringList))); connect(this,SIGNAL(onModifyInfo(QString,QMap<QString,QString>)),this,SLOT(onModifyInfo(QString,QMap<QString,QString>))); connect(this,SIGNAL(onOK(QString)),this,SLOT(onOK(QString))); OAbstractPeer::init(); } //public slots: void OClientPeer::onLogin(QString uname,QString pwdHash,QVector<int> p2pPort,bool isMain,bool isForce,bool isShowIp) { if(client->isLoged)//如果已经登录了 {