re implement chat parsing for urls. External web browser call might not work on some systems

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2224 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-07 12:36:37 +00:00
parent 37e9bf527c
commit db225bdcb7
4 changed files with 255 additions and 233 deletions

View File

@ -193,8 +193,8 @@ PeersDialog::PeersDialog(QWidget *parent)
ui.menupushButton->setMenu(menu);
ui.msgText->setOpenExternalLinks ( false );
ui.msgText->setOpenLinks ( false );
//ui.msgText->setOpenExternalLinks ( false );
//ui.msgText->setOpenLinks ( false );
setAcceptDrops(true);
ui.lineEdit->setAcceptDrops(false);
@ -890,7 +890,7 @@ void PeersDialog::insertChat()
/* add in lines at the bottom */
for(it = newchat.begin(); it != newchat.end(); it++)
{
std::string msg(it->msg.begin(), it->msg.end());
std::string msg(it->msg.begin(), it->msg.end());
#ifdef PEERS_DEBUG
std::cerr << "PeersDialog::insertChat(): " << msg << std::endl;
#endif
@ -907,50 +907,64 @@ void PeersDialog::insertChat()
std::ostringstream out;
QString extraTxt;
QString timestamp = QDateTime::currentDateTime().toString("hh:mm:ss");
QString name = QString::fromStdString(it->name);
QString line = "<span style=\"color:#C00000\">" + timestamp + "</span>" +
"<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span>";
QString timestamp = QDateTime::currentDateTime().toString("hh:mm:ss");
QString name = QString::fromStdString(it->name);
QString line = "<span style=\"color:#C00000\">" + timestamp + "</span>" +
"<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span>";
//std::cerr << "PeersDialog::insertChat(): 1.11\n";
historyKeeper.addMessage(name, "THIS", QString::fromStdWString(it->msg));
//std::cerr << "PeersDialog::insertChat(): 1.12\n";
extraTxt += line;
//std::cerr << "PeersDialog::insertChat(): 1.11\n";
historyKeeper.addMessage(name, "THIS", QString::fromStdWString(it->msg));
//std::cerr << "PeersDialog::insertChat(): 1.12\n";
extraTxt += line;
extraTxt += QString::fromStdWString(it->msg);
extraTxt += QString::fromStdWString(it->msg);
// notify with a systray icon msg
if(it->rsid != rsPeers->getOwnId())
{
// This is a trick to translate HTML into text.
QTextEdit editor ;
editor.setHtml(QString::fromStdWString(it->msg));
QString notifyMsg(QString::fromStdString(it->name)+": "+editor.toPlainText()) ;
// notify with a systray icon msg
if(it->rsid != rsPeers->getOwnId())
{
// This is a trick to translate HTML into text.
QTextEdit editor ;
editor.setHtml(QString::fromStdWString(it->msg));
QString notifyMsg(QString::fromStdString(it->name)+": "+editor.toPlainText()) ;
if(notifyMsg.length() > 30)
emit notifyGroupChat(QString("New group chat"), notifyMsg.left(30)+QString("..."));
else
emit notifyGroupChat(QString("New group chat"), notifyMsg);
}
if(notifyMsg.length() > 30)
emit notifyGroupChat(QString("New group chat"), notifyMsg.left(30)+QString("..."));
else
emit notifyGroupChat(QString("New group chat"), notifyMsg);
}
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
foreach(QString code, i.key().split("|"))
extraTxt.replace(code, "<img src=\"" + i.value() + "\" />");
}
//replace http://, https:// and www. with <a href> links
QRegExp rx("(https?://[^ <>]*)|(www\\.[^ <>]*)");
int count = 0;
int pos = 200; //ignore the first 200 char because of the standard DTD ref
while ( (pos = rx.indexIn(extraTxt, pos)) != -1 ) {
//we need to look ahead to see if it's already a well formed link
if (extraTxt.mid(pos - 6, 6) != "href=\"" && extraTxt.mid(pos - 6, 6) != "href='" && extraTxt.mid(pos - 6, 6) != "ttp://" ) {
QString tempMessg = extraTxt.left(pos) + "<a href=\"" + rx.cap(count) + "\">" + rx.cap(count) + "</a>" + extraTxt.mid(pos + rx.matchedLength(), -1);
extraTxt = tempMessg;
}
pos += rx.matchedLength() + 15;
count ++;
}
if ((msgWidget->verticalScrollBar()->maximum() - 30) < msgWidget->verticalScrollBar()->value() ) {
msgWidget->append(extraTxt);
} else {
//the vertical scroll is not at the bottom, so just update the text, the scroll will stay at the current position
int scroll = msgWidget->verticalScrollBar()->value();
msgWidget->setHtml(msgWidget->toHtml() + extraTxt);
msgWidget->verticalScrollBar()->setValue(scroll);
msgWidget->update();
}
}
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
foreach(QString code, i.key().split("|"))
extraTxt.replace(code, "<img src=\"" + i.value() + "\" />");
}
if ((msgWidget->verticalScrollBar()->maximum() - 30) < msgWidget->verticalScrollBar()->value() ) {
msgWidget->append(extraTxt);
} else {
//the vertical scroll is not at the bottom, so just update the text, the scroll will stay at the current position
int scroll = msgWidget->verticalScrollBar()->value();
msgWidget->setHtml(msgWidget->toHtml() + extraTxt);
msgWidget->verticalScrollBar()->setValue(scroll);
msgWidget->update();
}
}
}
void PeersDialog::checkChat()
@ -1522,7 +1536,7 @@ void PeersDialog::addAttachment(std::string filePath) {
}
void PeersDialog::fileHashingFinished(AttachFileItem* file) {
std::cerr << "PopupChatDialog::fileHashingFinished() started.";
std::cerr << "PeersDialog::fileHashingFinished() started.";
std::cerr << std::endl;
//check that the file is ok tos end
@ -1553,8 +1567,8 @@ void PeersDialog::fileHashingFinished(AttachFileItem* file) {
std::string mesgString = "<a href='retroshare://file|" + (file->FileName()) + "|" + fileSize + "|" + (file->FileHash()) + "'>"
+ "retroshare://file|" + (file->FileName()) + "|" + fileSize + "|" + (file->FileHash()) + "</a>";
#ifdef CHAT_DEBUG
std::cerr << "CreateForumMsg::anchorClicked mesgString : " << mesgString << std::endl;
#ifdef PEERS_DEBUG
std::cerr << "PeersDialog::fileHashingFinished mesgString : " << mesgString << std::endl;
#endif
const char * messageString = mesgString.c_str ();
@ -1581,8 +1595,8 @@ void PeersDialog::fileHashingFinished(AttachFileItem* file) {
void PeersDialog::anchorClicked (const QUrl& link )
{
#ifdef FORUM_DEBUG
std::cerr << "ForumsDialog::anchorClicked link.scheme() : " << link.scheme().toStdString() << std::endl;
#ifdef PEERS_DEBUG
std::cerr << "PeersDialog::anchorClicked link.scheme() : " << link.scheme().toStdString() << std::endl;
#endif
if (link.scheme() == "retroshare")
@ -1593,7 +1607,7 @@ void PeersDialog::anchorClicked (const QUrl& link )
uint64_t fileSize = L.at(2).toULongLong();
std::string fileHash = L.at(3).toStdString() ;
#ifdef FORUM_DEBUG
#ifdef PEERS_DEBUG
std::cerr << "PeersDialog::anchorClicked FileRequest : fileName : " << fileName << ". fileHash : " << fileHash << ". fileSize : " << fileSize << std::endl;
#endif

View File

@ -861,6 +861,12 @@ background: white;}</string>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>

View File

@ -99,8 +99,8 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
// Create the status bar
resetStatusBar() ;
ui.textBrowser->setOpenExternalLinks ( false );
ui.textBrowser->setOpenLinks ( false );
//ui.textBrowser->setOpenExternalLinks ( false );
//ui.textBrowser->setOpenLinks ( false );
QString title = QString::fromStdString(name) + " :" + tr(" RetroShare - Encrypted Chat") ;
setWindowTitle(title);
@ -252,29 +252,21 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
//replace http://, https:// and www. with <a href> links
QRegExp rx("(https?://[^ <>]*)|(www\\.[^ <>]*)");
int count = 0;
int pos = 100; //ignor the first 100 charater because of the standard DTD ref
int pos = 100; //ignore the first 100 char because of the standard DTD ref
while ( (pos = rx.indexIn(message, pos)) != -1 ) {
count ++;
//we need to look ahead to see if it's already a well formed link
if (message.mid(pos - 6, 6) != "href=\"" && message.mid(pos - 6, 6) != "href='" && message.mid(pos - 6, 6) != "ttp://" ) {
QString tempMessg = message.left(pos) + "<a href=\"" + rx.cap(count) + "\">" + rx.cap(count) + "</a>" + message.mid(pos + rx.matchedLength(), -1);
message = tempMessg;
}
pos += rx.matchedLength() + 15;
}
count ++;
}
#ifdef CHAT_DEBUG
std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << std::endl;
#endif
/*QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
message.replace(i.key(), "<img src=\"" + i.value() + "\">");
}*/
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PopupChatDialog</class>
<widget class="QMainWindow" name="PopupChatDialog" >
<property name="geometry" >
<widget class="QMainWindow" name="PopupChatDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,100 +10,103 @@
<height>439</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" >
<property name="rightMargin" >
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout">
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing">
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QTextBrowser" name="textBrowser" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="sizeIncrement" >
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item rowspan="4" row="0" column="1" >
<widget class="QFrame" name="avatarframe" >
<property name="frameShape" >
<item row="0" column="1" rowspan="4">
<widget class="QFrame" name="avatarframe">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin" >
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin" >
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="bottomMargin">
<number>9</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="avatarlabel" >
<property name="minimumSize" >
<item row="0" column="0">
<widget class="QLabel" name="avatarlabel">
<property name="minimumSize">
<size>
<width>116</width>
<height>116</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>116</width>
<height>116</height>
</size>
</property>
<property name="styleSheet" >
<property name="styleSheet">
<string>QLabel{
border-image: url(:/images/mystatus_bg.png);
}</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<item row="1" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>61</width>
<height>141</height>
@ -110,43 +114,43 @@ border-image: url(:/images/mystatus_bg.png);
</property>
</spacer>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="myavatarlabel" >
<property name="minimumSize" >
<item row="2" column="0">
<widget class="QLabel" name="myavatarlabel">
<property name="minimumSize">
<size>
<width>116</width>
<height>116</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>116</width>
<height>116</height>
</size>
</property>
<property name="styleSheet" >
<property name="styleSheet">
<string>QLabel{
border-image: url(:/images/mystatus_bg.png);
}</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0" >
<item row="3" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>61</width>
<height>30</height>
@ -157,42 +161,42 @@ border-image: url(:/images/mystatus_bg.png);
</layout>
</widget>
</item>
<item rowspan="4" row="0" column="2" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QPushButton" name="avatarFrameButton" >
<property name="minimumSize" >
<item row="0" column="2" rowspan="4">
<layout class="QGridLayout">
<item row="0" column="0">
<widget class="QPushButton" name="avatarFrameButton">
<property name="minimumSize">
<size>
<width>14</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>14</width>
<height>31</height>
</size>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>16</width>
<height>31</height>
</size>
</property>
<property name="checkable" >
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<item row="1" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>14</width>
<height>321</height>
@ -202,33 +206,33 @@ border-image: url(:/images/mystatus_bg.png);
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QFrame" name="Chatbuttonframe" >
<property name="minimumSize" >
<item row="1" column="0">
<widget class="QFrame" name="Chatbuttonframe">
<property name="minimumSize">
<size>
<width>16</width>
<height>46</height>
</size>
</property>
<property name="frameShape" >
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" >
<property name="topMargin" >
<layout class="QGridLayout">
<property name="topMargin">
<number>9</number>
</property>
<property name="horizontalSpacing" >
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="0" column="0" >
<item row="0" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>190</width>
<height>25</height>
@ -236,30 +240,30 @@ border-image: url(:/images/mystatus_bg.png);
</property>
</spacer>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="emoteiconButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<item row="0" column="1">
<widget class="QPushButton" name="emoteiconButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
@ -267,30 +271,30 @@ border-image: url(:/images/mystatus_bg.png);
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="styleButton" >
<property name="minimumSize" >
<item row="0" column="2">
<widget class="QPushButton" name="styleButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Set Chat Window Style&lt;/p>&lt;/body>&lt;/html></string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Set Chat Window Style&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
@ -298,136 +302,140 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QPushButton" name="textboldButton" >
<property name="minimumSize" >
<item row="0" column="3">
<widget class="QPushButton" name="textboldButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Bold</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="icon" >
<iconset>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
<property name="icon">
<iconset>
<normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
</property>
<property name="checkable" >
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="4" >
<widget class="QPushButton" name="textunderlineButton" >
<property name="minimumSize" >
<item row="0" column="4">
<widget class="QPushButton" name="textunderlineButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Underline</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="icon" >
<iconset>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
<property name="icon">
<iconset>
<normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
</property>
<property name="checkable" >
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="5" >
<widget class="QPushButton" name="textitalicButton" >
<property name="minimumSize" >
<item row="0" column="5">
<widget class="QPushButton" name="textitalicButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Italic</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="icon" >
<iconset>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
<property name="icon">
<iconset>
<normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
</property>
<property name="checkable" >
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="6" >
<widget class="QPushButton" name="fontButton" >
<property name="minimumSize" >
<item row="0" column="6">
<widget class="QPushButton" name="fontButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Set Font</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="icon" >
<iconset>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
<property name="icon">
<iconset>
<normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</normaloff>C:/Dokumente und Einstellungen/Linux/.designer/backup</iconset>
</property>
<property name="checkable" >
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="7" >
<widget class="QPushButton" name="colorButton" >
<property name="minimumSize" >
<item row="0" column="7">
<widget class="QPushButton" name="colorButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Text Color</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
</widget>
@ -435,39 +443,40 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="QTextEdit" name="chattextEdit" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Expanding" >
<item row="2" column="0">
<widget class="QTextEdit" name="chattextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="0" >
<layout class="QHBoxLayout" >
<property name="leftMargin" >
<item row="3" column="0">
<layout class="QHBoxLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin" >
<property name="topMargin">
<number>2</number>
</property>
<property name="bottomMargin" >
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="addFileButton" >
<property name="toolTip" >
<widget class="QPushButton" name="addFileButton">
<property name="toolTip">
<string>Add a File for your Friend</string>
</property>
<property name="text" >
<property name="text">
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/add-share24.png</iconset>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
@ -477,10 +486,10 @@ p, li { white-space: pre-wrap; }
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>331</width>
<height>20</height>
@ -489,72 +498,73 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
<widget class="QPushButton" name="sendButton" >
<property name="text" >
<widget class="QPushButton" name="sendButton">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" >
<layout class="QVBoxLayout" />
<item row="4" column="0">
<layout class="QVBoxLayout"/>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar" />
<widget class="QToolBar" name="toolBar" >
<property name="windowTitle" >
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="iconSize" >
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<attribute name="toolBarArea" >
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionAvatar" />
<addaction name="actionAvatar"/>
</widget>
<action name="actionBold" >
<property name="text" >
<action name="actionBold">
<property name="text">
<string>Bold</string>
</property>
</action>
<action name="actionItalic" >
<property name="text" >
<action name="actionItalic">
<property name="text">
<string>Italic</string>
</property>
</action>
<action name="actionUnderline" >
<property name="text" >
<action name="actionUnderline">
<property name="text">
<string>Underline</string>
</property>
</action>
<action name="actionStrike" >
<property name="text" >
<action name="actionStrike">
<property name="text">
<string>Strike</string>
</property>
</action>
<action name="actionAvatar" >
<property name="icon" >
<iconset resource="../images.qrc" >:/images/add_image24.png</iconset>
<action name="actionAvatar">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Avatar</string>
</property>
<property name="toolTip" >
<property name="toolTip">
<string>Set your Avatar Picture</string>
</property>
</action>
</widget>
<resources>
<include location="../images.qrc" />
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>