source/MainGUI.cpp
/**
 * Slot which is emitted when the friendlist was clicked.
 *
 * @param mouseEvent QMouseEvent* holding additional information.
 */
Slot which is emitted when the friendlist was clicked.
@param mouseEvent QMouseEvent* holding additional information.
Slot which is emitted when the friendlist was clicked . @param mouseEvent QMouseEvent * holding additional information .
void MainGUI::onFriendlistItemClicked (QMouseEvent *mouseEvent)
{
    widget.inputTextArea->setFocus();
    QListWidgetItem *item = widget.friendList->itemAt(mouseEvent->pos());
    if (!item)
    {
        return;
    }
    if (mouseEvent->button() == Qt::LeftButton)
    {
        widget.inputTextArea->setPlainText("/w " + item->text() + " ");
        widget.inputTextArea->moveCursor(QTextCursor::End);
    }
}
void MainGUI :: onFriendlistItemClicked ( QMouseEvent * mouseEvent ) { widget . inputTextArea -> setFocus ( ) ; QListWidgetItem * item = widget . friendList -> itemAt ( mouseEvent -> pos ( ) ) ; if ( ! item ) { return ; } if ( mouseEvent -> button ( ) == Qt :: LeftButton ) { widget . inputTextArea -> setPlainText ( " " + item -> text ( ) + " " ) ; widget . inputTextArea -> moveCursor ( QTextCursor :: End ) ; } }
Slot which is emitted when the friendlist was clicked.
Slot which is emitted when the friendlist was clicked .