redesigned Friends Dialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@642 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-07-10 10:34:49 +00:00
parent ca69e3d5e3
commit 6b88d80b5e
6 changed files with 875 additions and 103 deletions

View File

@ -59,7 +59,7 @@
/* Images for toolbar icons */
#define IMAGE_NETWORK ":/images/network32.png"
#define IMAGE_PEERS ":/images/peers_24x24.png"
#define IMAGE_PEERS ":/images/groupchat.png"
#define IMAGE_SEARCH ":/images/filefind.png"
#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
#define IMAGE_LINKS ":/images/ktorrent.png"
@ -169,8 +169,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.stackPages->add(sharedfilesDialog = new SharedFilesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_FILES), tr("Files"), grp));
ui.stackPages->add(chatDialog = new ChatDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_CHAT), tr("Chat"), grp));
//ui.stackPages->add(chatDialog = new ChatDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_CHAT), tr("Chat"), grp));
ui.stackPages->add(messagesDialog = new MessagesDialog(ui.stackPages),
createPageAction(QIcon(IMAGE_MESSAGES), tr("Messages"), grp));

View File

@ -28,6 +28,7 @@
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include "rsiface/rsstatus.h"
#include "rsiface/rsmsgs.h"
#include "chat/PopupChatDialog.h"
#include "msgs/ChanMsgDialog.h"
@ -37,6 +38,13 @@
#include <iostream>
#include <sstream>
#include <QTextCodec>
#include <QTextEdit>
#include <QTextCursor>
#include <QTextList>
#include <QTextStream>
#include <QTextDocumentFragment>
#include <QContextMenuEvent>
#include <QMenu>
#include <QCursor>
@ -45,6 +53,7 @@
#include <QPixmap>
#include <QMessageBox>
#include <QHeaderView>
#include <QtGui/QKeyEvent>
/* Images for context menu icons */
@ -54,8 +63,8 @@
#define IMAGE_CHAT ":/images/chat.png"
#define IMAGE_MSG ":/images/message-mail.png"
/* Images for Status icons */
#define IMAGE_ONLINE ":/images/donline.png"
#define IMAGE_OFFLINE ":/images/dhidden.png"
#define IMAGE_ONLINE ":/images/user/identity24.png"
#define IMAGE_OFFLINE ":/images/user/identityoffline24.png"
/******
* #define PEERS_DEBUG 1
@ -79,21 +88,62 @@ PeersDialog::PeersDialog(QWidget *parent)
_header->setResizeMode (0, QHeaderView::Custom);
_header->setResizeMode (1, QHeaderView::Interactive);
_header->setResizeMode (2, QHeaderView::Interactive);
_header->setResizeMode (3, QHeaderView::Interactive);
/*_header->setResizeMode (3, QHeaderView::Interactive);
_header->setResizeMode (4, QHeaderView::Interactive);
_header->setResizeMode (5, QHeaderView::Interactive);
_header->setResizeMode (6, QHeaderView::Interactive);
_header->setResizeMode (7, QHeaderView::Interactive);
_header->setResizeMode (7, QHeaderView::Interactive);*/
_header->resizeSection ( 0, 25 );
_header->resizeSection ( 1, 100 );
_header->resizeSection ( 2, 100 );
_header->resizeSection ( 3, 120 );
/*_header->resizeSection ( 3, 120 );
_header->resizeSection ( 4, 100 );
_header->resizeSection ( 5, 230 );
_header->resizeSection ( 6, 120 );
_header->resizeSection ( 7, 220 );
_header->resizeSection ( 7, 220 );*/
loadEmoticonsgroupchat();
//setWindowIcon(QIcon(QString(":/images/rstray3.png")));
connect(ui.lineEdit, SIGNAL(textChanged ( ) ), this, SLOT(checkChat( ) ));
connect(ui.Sendbtn, SIGNAL(clicked()), this, SLOT(sendMsg()));
connect(ui.emoticonBtn, SIGNAL(clicked()), this, SLOT(smileyWidgetgroupchat()));
//connect( ui.msgSendList, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( msgSendListCostumPopupMenu( QPoint ) ) );
connect( ui.msgText, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoChatMenu(const QPoint&)));
connect(ui.textboldChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui.textunderlineChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui.textitalicChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui.fontsButton, SIGNAL(clicked()), this, SLOT(getFont()));
connect(ui.colorChatButton, SIGNAL(clicked()), this, SLOT(setColor()));
ui.fontsButton->setIcon(QIcon(QString(":/images/fonts.png")));
_currentColor = Qt::black;
QPixmap pxm(24,24);
pxm.fill(_currentColor);
ui.colorChatButton->setIcon(pxm);
mCurrentFont = QFont("Comic Sans MS", 12);
ui.lineEdit->setFont(mCurrentFont);
setChatInfo(tr("Welcome to RetroShare's group chat."), QString::fromUtf8("blue"));
QMenu * grpchatmenu = new QMenu();
grpchatmenu->addAction(ui.actionClearChat);
ui.menuButton->setMenu(grpchatmenu);
_underline = false;
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(insertChat()));
timer->start(500); /* half a second */
@ -176,7 +226,7 @@ void PeersDialog::insertPeers()
/* remove old items ??? */
peerWidget->clear();
peerWidget->setColumnCount(8);
peerWidget->setColumnCount(3);
QList<QTreeWidgetItem *> items;
@ -259,7 +309,7 @@ void PeersDialog::insertPeers()
/* bright green */
for(i = 1; i < 8; i++)
{
item -> setBackground(i,QBrush(Qt::green));
//item -> setBackground(i,QBrush(Qt::green));
item -> setIcon(0,(QIcon(IMAGE_ONLINE)));
}
}
@ -287,7 +337,7 @@ void PeersDialog::insertPeers()
{
for(i = 1; i < 8; i++)
{
item -> setBackground(i,QBrush(Qt::lightGray));
//item -> setBackground(i,QBrush(Qt::lightGray));
item -> setIcon(0,(QIcon(IMAGE_OFFLINE)));
}
}
@ -373,26 +423,26 @@ void PeersDialog::chatfriend()
return;
}
if (detail.state & RS_PEER_STATE_CONNECTED)
{
/*if (detail.state & RS_PEER_STATE_CONNECTED)
{*/
/* must reference ChatDialog */
if (chatDialog)
{
chatDialog->getPrivateChat(id, name, true);
}
}
/*}
else
{
{*/
/* info dialog */
QMessageBox::StandardButton sb = QMessageBox::question ( NULL,
"Friend Not Online",
"Your Friend is offline \nDo you want to send them a Message instead",
(QMessageBox::Yes | QMessageBox::No));
if (sb == QMessageBox::Yes)
// QMessageBox::StandardButton sb = QMessageBox::question ( NULL,
// "Friend Not Online",
//"Your Friend is offline \nDo you want to send them a Message instead",
// (QMessageBox::Yes | QMessageBox::No));
/*if (sb == QMessageBox::Yes)
{
msgfriend();
}
}
}*/
return;
}
@ -572,4 +622,349 @@ void PeersDialog::configurefriend()
}
void PeersDialog::insertChat()
{
if (!rsMsgs->chatAvailable())
{
return;
}
std::list<ChatInfo> newchat;
if (!rsMsgs->getNewChat(newchat))
{
return;
}
QTextEdit *msgWidget = ui.msgText;
std::list<ChatInfo>::iterator it;
/* add in lines at the bottom */
for(it = newchat.begin(); it != newchat.end(); it++)
{
std::string msg(it->msg.begin(), it->msg.end());
std::cerr << "ChatDialog::insertChat(): " << msg << std::endl;
/* are they private? */
if (it->chatflags & RS_CHAT_PRIVATE)
{
PopupChatDialog *pcd = getPrivateChat(it->rsid, it->name, true);
pcd->addChatMsg(&(*it));
continue;
}
std::ostringstream out;
QString currenttxt = msgWidget->toHtml();
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>";
extraTxt += line;
extraTxt += QString::fromStdWString(it->msg);
/* add it everytime */
currenttxt += extraTxt;
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
currenttxt.replace(i.key(), "<img src=\"" + i.value() + "\">");
}
msgWidget->setHtml(currenttxt);
QScrollBar *qsb = msgWidget->verticalScrollBar();
qsb -> setValue(qsb->maximum());
}
}
void PeersDialog::checkChat()
{
/* if <return> at the end of the text -> we can send it! */
QTextEdit *chatWidget = ui.lineEdit;
std::string txt = chatWidget->toPlainText().toStdString();
if ('\n' == txt[txt.length()-1])
{
//std::cerr << "Found <return> found at end of :" << txt << ": should send!";
//std::cerr << std::endl;
if (txt.length()-1 == txt.find('\n')) /* only if on first line! */
{
/* should remove last char ... */
sendMsg();
}
}
else
{
//std::cerr << "No <return> found in :" << txt << ":";
//std::cerr << std::endl;
}
}
void PeersDialog::sendMsg()
{
QTextEdit *lineWidget = ui.lineEdit;
ChatInfo ci;
//ci.msg = lineWidget->Text().toStdWString();
ci.msg = lineWidget->toHtml().toStdWString();
ci.chatflags = RS_CHAT_PUBLIC;
std::string msg(ci.msg.begin(), ci.msg.end());
std::cerr << "ChatDialog::sendMsg(): " << msg << std::endl;
rsMsgs -> ChatSend(ci);
ui.lineEdit->clear();
setFont();
/* redraw send list */
insertSendList();
}
void PeersDialog::insertSendList()
{
std::list<std::string> peers;
std::list<std::string>::iterator it;
if (!rsPeers)
{
/* not ready yet! */
return;
}
rsPeers->getOnlineList(peers);
/* get a link to the table */
//QTreeWidget *sendWidget = ui.msgSendList;
QList<QTreeWidgetItem *> items;
for(it = peers.begin(); it != peers.end(); it++)
{
RsPeerDetails details;
if (!rsPeers->getPeerDetails(*it, details))
{
continue; /* BAD */
}
/* make a widget per friend */
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
/* add all the labels */
/* (0) Person */
item -> setText(0, QString::fromStdString(details.name));
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
//item -> setFlags(Qt::ItemIsUserCheckable);
item -> setCheckState(0, Qt::Checked);
if (rsicontrol->IsInChat(*it))
{
item -> setCheckState(0, Qt::Checked);
}
else
{
item -> setCheckState(0, Qt::Unchecked);
}
/* disable for the moment */
item -> setFlags(Qt::ItemIsUserCheckable);
item -> setCheckState(0, Qt::Checked);
/* add to the list */
items.append(item);
}
/* remove old items */
//sendWidget->clear();
//sendWidget->setColumnCount(1);
/* add the items in! */
//sendWidget->insertTopLevelItems(0, items);
//sendWidget->update(); /* update display */
}
/* to toggle the state */
void PeersDialog::toggleSendItem( QTreeWidgetItem *item, int col )
{
std::cerr << "ToggleSendItem()" << std::endl;
/* extract id */
std::string id = (item -> text(4)).toStdString();
/* get state */
bool inChat = (Qt::Checked == item -> checkState(0)); /* alway column 0 */
/* call control fns */
rsicontrol -> SetInChat(id, inChat);
return;
}
PopupChatDialog *PeersDialog::getPrivateChat(std::string id, std::string name, bool show)
{
/* see if it exists already */
PopupChatDialog *popupchatdialog = NULL;
std::map<std::string, PopupChatDialog *>::iterator it;
if (chatDialogs.end() != (it = chatDialogs.find(id)))
{
/* exists already */
popupchatdialog = it->second;
}
else
{
popupchatdialog = new PopupChatDialog(id, name);
chatDialogs[id] = popupchatdialog;
}
if (show)
{
popupchatdialog->show();
}
return popupchatdialog;
}
void PeersDialog::clearOldChats()
{
/* nothing yet */
}
void PeersDialog::setColor()
{
bool ok;
QRgb color = QColorDialog::getRgba(ui.lineEdit->textColor().rgba(), &ok, this);
if (ok) {
_currentColor = QColor(color);
QPixmap pxm(24,24);
pxm.fill(_currentColor);
ui.colorChatButton->setIcon(pxm);
}
setFont();
}
void PeersDialog::getFont()
{
bool ok;
mCurrentFont = QFontDialog::getFont(&ok, mCurrentFont, this);
setFont();
}
void PeersDialog::setFont()
{
mCurrentFont.setBold(ui.textboldChatButton->isChecked());
mCurrentFont.setUnderline(ui.textunderlineChatButton->isChecked());
mCurrentFont.setItalic(ui.textitalicChatButton->isChecked());
ui.lineEdit->setFont(mCurrentFont);
ui.lineEdit->setTextColor(_currentColor);
ui.lineEdit->setFocus();
}
void PeersDialog::underline()
{
_underline = !_underline;
ui.lineEdit->setFontUnderline(_underline);
}
// Update Chat Info information
void PeersDialog::setChatInfo(QString info, QColor color)
{
static unsigned int nbLines = 0;
++nbLines;
// Check log size, clear it if too big
if(nbLines > 200) {
ui.msgText->clear();
nbLines = 1;
}
ui.msgText->append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color.name() +QString::fromUtf8("'><i>") + info + QString::fromUtf8("</i></font>"));
}
void PeersDialog::on_actionClearChat_triggered()
{
ui.msgText->clear();
}
void PeersDialog::displayInfoChatMenu(const QPoint& pos)
{
// Log Menu
QMenu myChatMenu(this);
myChatMenu.addAction(ui.actionClearChat);
// XXX: Why mapToGlobal() is not enough?
myChatMenu.exec(mapToGlobal(pos)+QPoint(0,80));
}
void PeersDialog::loadEmoticonsgroupchat()
{
QDir smdir(QApplication::applicationDirPath() + "/emoticons/kopete");
QFileInfoList sminfo = smdir.entryInfoList(QStringList() << "*.gif" << "*.png", QDir::Files, QDir::Name);
foreach(QFileInfo info, sminfo)
{
QString smcode = info.fileName().replace(".gif", "");
QString smstring;
for(int i = 0; i < 9; i+=3)
{
smstring += QString((char)smcode.mid(i,3).toInt());
}
//qDebug(smstring.toAscii());
smileys.insert(smstring, info.absoluteFilePath());
}
}
void PeersDialog::smileyWidgetgroupchat()
{
qDebug("MainWindow::smileyWidget()");
QWidget *smWidget = new QWidget;
smWidget->setWindowTitle("Emoticons");
smWidget->setWindowIcon(QIcon(QString(":/images/rstray3.png")));
smWidget->setFixedSize(256,256);
int x = 0, y = 0;
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
QPushButton *smButton = new QPushButton("", smWidget);
smButton->setGeometry(x*24, y*24, 24,24);
smButton->setIconSize(QSize(24,24));
smButton->setIcon(QPixmap(i.value()));
smButton->setToolTip(i.key());
//smButton->setFixedSize(24,24);
++x;
if(x > 4)
{
x = 0;
y++;
}
connect(smButton, SIGNAL(clicked()), this, SLOT(addSmileys()));
}
smWidget->show();
}
void PeersDialog::addSmileys()
{
ui.lineEdit->setText(ui.lineEdit->toHtml() + qobject_cast<QPushButton*>(sender())->toolTip());
}

View File

@ -24,12 +24,15 @@
#include <QFileDialog>
//#include <config/rsharesettings.h>
#include "chat/PopupChatDialog.h"
#include "mainpage.h"
#include "ui_PeersDialog.h"
class QFont;
class QAction;
class QTextEdit;
class QTextCharFormat;
class ChatDialog;
class PeersDialog : public MainPage
@ -39,13 +42,29 @@ class PeersDialog : public MainPage
public:
/** Default Constructor */
PeersDialog(QWidget *parent = 0);
/** Default Destructor */
/** Default Destructor */
PopupChatDialog *getPrivateChat(std::string id, std::string name, bool show);
void clearOldChats();
void loadEmoticonsgroupchat();
void insertPeers();
void setChatDialog(ChatDialog *cd);
public slots:
void toggleSendItem( QTreeWidgetItem *item, int col );
void insertChat();
void setChatInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
void smileyWidgetgroupchat();
void addSmileys();
void on_actionClearChat_triggered();
void displayInfoChatMenu(const QPoint& pos);
private slots:
@ -68,6 +87,17 @@ private slots:
void connectfriend();
void setaddressfriend();
void trustfriend();
void setColor();
void insertSendList();
void checkChat();
void sendMsg();
//void privchat();
void setFont();
void getFont();
void underline();
private:
@ -92,6 +122,15 @@ private:
QAction* removefriendAct;
QTreeWidget *peertreeWidget;
QColor _currentColor;
bool _underline;
QHash<QString, QString> smileys;
std::map<std::string, PopupChatDialog *> chatDialogs;
QFont mCurrentFont; /* how the text will come out */
/** Qt Designer generated object */
Ui::PeersDialog ui;

View File

@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>261</height>
<width>825</width>
<height>516</height>
</rect>
</property>
<property name="palette" >
@ -493,57 +493,11 @@
<enum>Qt::NoContextMenu</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>1</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>1</number>
</property>
<property name="horizontalSpacing" >
<number>1</number>
</property>
<property name="verticalSpacing" >
<number>1</number>
</property>
<item row="0" column="0" >
<item rowspan="3" row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
@ -570,7 +524,7 @@
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/peers_16x16.png</pixmap>
<pixmap resource="images.qrc" >:/images/user/friends24.png</pixmap>
</property>
</widget>
</item>
@ -586,6 +540,19 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>201</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QTreeWidget" name="peertreeWidget" >
<property name="contextMenuPolicy" >
@ -596,8 +563,8 @@ p, li { white-space: pre-wrap; }
</property>
<property name="iconSize" >
<size>
<width>16</width>
<height>16</height>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="itemsExpandable" >
@ -621,36 +588,404 @@ p, li { white-space: pre-wrap; }
<string>Person</string>
</property>
</column>
<column>
<property name="text" >
<string>Auto Connect</string>
</property>
</column>
<column>
<property name="text" >
<string>Trust Level</string>
</property>
</column>
<column>
<property name="text" >
<string>Peer Address</string>
</property>
</column>
<column>
<property name="text" >
<string>Last Contact</string>
</property>
</column>
<column>
<property name="text" >
<string>Person Id</string>
</property>
</column>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="images.qrc" >:/images/chat.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_12" >
<property name="font" >
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Live Group Chat:</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QTextBrowser" name="msgText" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="undoRedoEnabled" >
<bool>false</bool>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>321</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="4" >
<widget class="QPushButton" name="textitalicChatButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip" >
<string>Underline</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/edit-italic.png</iconset>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QPushButton" name="textunderlineChatButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip" >
<string>Italic</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/edit-underline.png</iconset>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="textboldChatButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip" >
<string>Bold</string>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/edit-bold.png</iconset>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="6" >
<widget class="QPushButton" name="colorChatButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip" >
<string>Text Color</string>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="0" column="5" >
<widget class="QPushButton" name="fontsButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip" >
<string>Font</string>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="emoticonBtn" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="images.qrc" >:/images/emoticons/kopete/kopete020.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="0" column="7" >
<widget class="QPushButton" name="menuButton" >
<property name="minimumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QTextEdit" name="lineEdit" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="sizeIncrement" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="baseSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="1" >
<layout class="QGridLayout" >
<item row="0" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>321</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="Sendbtn" >
<property name="text" >
<string>Send</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
<action name="actionClearChat" >
<property name="text" >
<string>Clear Chat History</string>
</property>
</action>
</widget>
<resources>
<include location="images.qrc" />

View File

@ -219,6 +219,9 @@
<file>images/toaster/toaster-background.png</file>
<file>images/toaster/toaster-backrs3.png</file>
<file>images/toaster/toaster-backrs4.png</file>
<file>images/user/friends24.png</file>
<file>images/user/identity24.png</file>
<file>images/user/identityoffline24.png</file>
<file>images/up.png</file>
<file>images/user.png</file>
<file>images/webcache_24x24.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB