Exemplo n.º 1
0
void EditWidget::showNextBufferedMessage()
{
	if (FBufferPos < FBuffer.count()-1)
	{
		if (FBufferPos<0 && !ui.medEditor->toPlainText().isEmpty())
		{
			appendMessageToBuffer();
			FBufferPos++;
		}
		FBufferPos++;
		showBufferedMessage();
	}
}
Exemplo n.º 2
0
bool EditWidget::sendMessage()
{
	bool sent = false;
	if (FSendEnabled)
	{
		bool hooked = false;
		QMultiMap<int, IMessageEditSendHandler *> handlers = FMessageWidgets->editSendHandlers();
		for (QMap<int,IMessageEditSendHandler *>::const_iterator it = handlers.constBegin(); !hooked && it!=handlers.constEnd(); ++it)
			hooked = (*it)->messageEditSendPrepare(it.key(),this);
		for (QMap<int,IMessageEditSendHandler *>::const_iterator it = handlers.constBegin(); !hooked && !sent && it!=handlers.constEnd(); ++it)
			sent = (*it)->messageEditSendProcesse(it.key(),this);

		if (sent)
		{
			appendMessageToBuffer();
			textEdit()->clear();
			emit messageSent();
		}
	}
	return sent;
}
Exemplo n.º 3
0
void EditWidget::sendMessage()
{
	emit messageAboutToBeSend();
	appendMessageToBuffer();
	emit messageReady();
}