equal
deleted
inserted
replaced
249 mainLayout.setSizeConstraint(QLayout::SetMinimumSize); |
249 mainLayout.setSizeConstraint(QLayout::SetMinimumSize); |
250 mainLayout.setColumnStretch(0, 76); |
250 mainLayout.setColumnStretch(0, 76); |
251 mainLayout.setColumnStretch(1, 24); |
251 mainLayout.setColumnStretch(1, 24); |
252 |
252 |
253 chatEditLine = new SmartLineEdit(this); |
253 chatEditLine = new SmartLineEdit(this); |
254 QStringList cmds; |
|
255 cmds << "/me" << "/discardStyleSheet" << "/saveStyleSheet"; |
|
256 chatEditLine->addCommands(cmds); |
|
257 chatEditLine->setMaxLength(300); |
254 chatEditLine->setMaxLength(300); |
258 connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); |
255 connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); |
259 |
256 |
260 mainLayout.addWidget(chatEditLine, 2, 0); |
257 mainLayout.addWidget(chatEditLine, 2, 0); |
261 |
258 |
583 } |
580 } |
584 |
581 |
585 void HWChatWidget::clear() |
582 void HWChatWidget::clear() |
586 { |
583 { |
587 chatEditLine->reset(); |
584 chatEditLine->reset(); |
|
585 |
|
586 // add default commands |
|
587 QStringList cmds; |
|
588 cmds << "/me" << "/discardStyleSheet" << "/saveStyleSheet"; |
|
589 chatEditLine->addCommands(cmds); |
|
590 |
588 chatText->clear(); |
591 chatText->clear(); |
589 chatStrings.clear(); |
592 chatStrings.clear(); |
590 chatNicks->clear(); |
593 chatNicks->clear(); |
591 m_userNick = gameSettings->value("net/nick","").toString(); |
594 m_userNick = gameSettings->value("net/nick","").toString(); |
592 m_hlRegExp = QRegExp(QString("^(.* )?%1(( |[^-a-z0-9_]( |$)).*)?$"). |
595 m_hlRegExp = QRegExp(QString("^(.* )?%1(( |[^-a-z0-9_]( |$)).*)?$"). |