예제 #1
0
int CChatDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: NewLocalInputText((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 1: OnLocalInputTextReturnPressed(); break;
        case 2: OnLocalInputTextTextChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 3: OnClearPressed(); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
예제 #2
0
파일: chatdlg.cpp 프로젝트: tzhuan/llcon
/* Implementation *************************************************************/
CChatDlg::CChatDlg ( QWidget* parent, Qt::WindowFlags f ) :
    QDialog ( parent, f )
{
    setupUi ( this );


    // Add help text to controls -----------------------------------------------
    // chat window
    txvChatWindow->setWhatsThis ( tr ( "<b>Chat Window:</b> The chat window "
        "shows a history of all chat messages." ) );

    txvChatWindow->setAccessibleName ( tr ( "Chat history" ) );

    // input message text
    edtLocalInputText->setWhatsThis ( tr ( "<b>Input Message Text:</b> Enter "
        "the chat message text in the edit box and press enter to send the "
        "message to the server which distributes the message to all connected "
        "clients. Your message will then show up in the chat window." ) );

    edtLocalInputText->setAccessibleName ( tr ( "New chat text edit box" ) );


    // clear chat window and edit line
    txvChatWindow->clear();
    edtLocalInputText->clear();


    // Connections -------------------------------------------------------------
    QObject::connect ( edtLocalInputText,
        SIGNAL ( textChanged ( const QString& ) ),
        this, SLOT ( OnLocalInputTextTextChanged ( const QString& ) ) );

    QObject::connect ( edtLocalInputText, SIGNAL ( returnPressed() ),
        this, SLOT ( OnLocalInputTextReturnPressed() ) );

    QObject::connect ( butClear, SIGNAL ( pressed() ),
        this, SLOT ( OnClearPressed() ) );
}