mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* Moved to display own video at bottom and Friend at top.
* Added to display system message text when call is stopped. * Fixing spaces on chat window. * Clean up chatwidget buttons, moved text color to the font menu button git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7731 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7a06e2f449
commit
b11459329b
@ -108,8 +108,8 @@ VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget)
|
||||
// Make a widget with two video devices, one for echo, and one for the talking peer.
|
||||
videoWidget = new QWidget(mChatWidget) ;
|
||||
videoWidget->setLayout(new QVBoxLayout()) ;
|
||||
videoWidget->layout()->addWidget(echoVideoDevice = new QVideoOutputDevice(videoWidget)) ;
|
||||
videoWidget->layout()->addWidget(outputVideoDevice = new QVideoOutputDevice(videoWidget)) ;
|
||||
videoWidget->layout()->addWidget(echoVideoDevice = new QVideoOutputDevice(videoWidget)) ;
|
||||
videoWidget->hide();
|
||||
|
||||
connect(inputVideoDevice, SIGNAL(networkPacketReady()), this, SLOT(sendVideoData()));
|
||||
@ -159,6 +159,11 @@ void VOIPChatWidgetHolder::hangupCall()
|
||||
if (outputAudioDevice) {
|
||||
outputAudioDevice->stop();
|
||||
}
|
||||
|
||||
if (mChatWidget) {
|
||||
mChatWidget->addChatMsg(true, tr("VoIP Status"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("Outgoing Call stopped."), ChatWidget::MSGTYPE_SYSTEM);
|
||||
}
|
||||
|
||||
audioListenToggleButton->setChecked(false);
|
||||
audioCaptureToggleButton->setChecked(false);
|
||||
hangupButton->hide();
|
||||
@ -219,6 +224,9 @@ void VOIPChatWidgetHolder::toggleVideoCapture()
|
||||
videoCaptureToggleButton->setToolTip(tr("Activate camera"));
|
||||
outputVideoDevice->showFrameOff();
|
||||
videoWidget->hide();
|
||||
|
||||
if (mChatWidget)
|
||||
mChatWidget->addChatMsg(true, tr("VoIP Status"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("Video call stopped"), ChatWidget::MSGTYPE_SYSTEM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,17 +108,14 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat()));
|
||||
connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile()));
|
||||
|
||||
//connect(ui->textboldButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
//connect(ui->textunderlineButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
//connect(ui->textitalicButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture()));
|
||||
connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(chooseColor()));
|
||||
connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
|
||||
connect(ui->actionSaveChatHistory, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
connect(ui->actionClearChatHistory, SIGNAL(triggered()), this, SLOT(clearChatHistory()));
|
||||
connect(ui->actionDeleteChatHistory, SIGNAL(triggered()), this, SLOT(deleteChatHistory()));
|
||||
connect(ui->actionMessageHistory, SIGNAL(triggered()), this, SLOT(messageHistory()));
|
||||
connect(ui->actionChooseFont, SIGNAL(triggered()), this, SLOT(chooseFont()));
|
||||
connect(ui->actionChooseColor, SIGNAL(triggered()), this, SLOT(chooseColor()));
|
||||
connect(ui->actionResetFont, SIGNAL(triggered()), this, SLOT(resetFont()));
|
||||
|
||||
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||
@ -143,6 +140,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(ui->actionChooseFont);
|
||||
menu->addAction(ui->actionChooseColor);
|
||||
menu->addAction(ui->actionResetFont);
|
||||
ui->fontButton->setMenu(menu);
|
||||
|
||||
@ -246,7 +244,6 @@ void ChatWidget::init(const RsPeerId &peerId, const QString &title)
|
||||
currentFont.fromString(PeerSettings->getPrivateChatFont(peerId));
|
||||
|
||||
colorChanged();
|
||||
//fontChanged();
|
||||
setColorAndFont();
|
||||
|
||||
// load style
|
||||
@ -1112,7 +1109,7 @@ void ChatWidget::colorChanged()
|
||||
{
|
||||
QPixmap pix(16, 16);
|
||||
pix.fill(currentColor);
|
||||
ui->colorButton->setIcon(pix);
|
||||
ui->actionChooseColor->setIcon(pix);
|
||||
}
|
||||
|
||||
void ChatWidget::chooseFont()
|
||||
@ -1121,7 +1118,6 @@ void ChatWidget::chooseFont()
|
||||
QFont font = QFontDialog::getFont(&ok, currentFont, this);
|
||||
if (ok) {
|
||||
currentFont = font;
|
||||
//fontChanged();
|
||||
setFont();
|
||||
}
|
||||
}
|
||||
@ -1129,22 +1125,11 @@ void ChatWidget::chooseFont()
|
||||
void ChatWidget::resetFont()
|
||||
{
|
||||
currentFont.fromString(Settings->getChatScreenFont());
|
||||
//fontChanged();
|
||||
setFont();
|
||||
}
|
||||
|
||||
void ChatWidget::fontChanged()
|
||||
{
|
||||
//ui->textboldButton->setChecked(currentFont.bold());
|
||||
//ui->textunderlineButton->setChecked(currentFont.underline());
|
||||
//ui->textitalicButton->setChecked(currentFont.italic());
|
||||
}
|
||||
|
||||
void ChatWidget::setColorAndFont()
|
||||
{
|
||||
//currentFont.setBold(ui->textboldButton->isChecked());
|
||||
//currentFont.setUnderline(ui->textunderlineButton->isChecked());
|
||||
//currentFont.setItalic(ui->textitalicButton->isChecked());
|
||||
|
||||
ui->chatTextEdit->setFont(currentFont);
|
||||
ui->chatTextEdit->setTextColor(currentColor);
|
||||
|
@ -173,7 +173,6 @@ private:
|
||||
void setCurrentFileName(const QString &fileName);
|
||||
|
||||
void colorChanged();
|
||||
void fontChanged();
|
||||
void setColorAndFont();
|
||||
void processSettings(bool load);
|
||||
|
||||
|
@ -540,14 +540,20 @@ border-image: url(:/images/closepressed.png)
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Font</string>
|
||||
<string>Set text font & color</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/fonts.png</normaloff>:/images/fonts.png</iconset>
|
||||
<normaloff>:/images/textedit/format-text-color.png</normaloff>:/images/textedit/format-text-color.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
@ -557,31 +563,6 @@ border-image: url(:/images/closepressed.png)
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="colorButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Text Color</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="attachPictureButton">
|
||||
<property name="minimumSize">
|
||||
@ -629,7 +610,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add a File for your Friend</string>
|
||||
<string>Attach a File</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
@ -836,6 +817,11 @@ border-image: url(:/images/closepressed.png)
|
||||
<string>WARNING: Could take long time on big history.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChooseColor">
|
||||
<property name="text">
|
||||
<string>Choose color</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -102,10 +102,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -41,12 +41,6 @@
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="chatstatusbar"/>
|
||||
<widget class="QToolBar" name="chattoolBar">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -55,8 +49,8 @@
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
|
@ -25,7 +25,7 @@ QString retroshareVersion();
|
||||
QString retroshareRevision();
|
||||
|
||||
#define GUI_VERSION "0.6.x"
|
||||
#define GUI_REVISION "Revision: 7106"
|
||||
#define GUI_REVISION "Revision: 7669"
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user