diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp index f8760132d..f44752205 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp @@ -107,15 +107,35 @@ VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget, VOIPNotify *n videoCaptureToggleButton->setAutoRaise(true) ; videoCaptureToggleButton->setCheckable(true) ; - connect(videoCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleVideoCapture())); + QIcon icon4 ; + icon4.addPixmap(QPixmap(":/images/channels32.png")) ; + icon4.addPixmap(QPixmap(":/images/folder-draft24.png"),QIcon::Normal,QIcon::On) ; + icon4.addPixmap(QPixmap(":/images/folder-draft24.png"),QIcon::Disabled,QIcon::On) ; + icon4.addPixmap(QPixmap(":/images/folder-draft24.png"),QIcon::Active,QIcon::On) ; + icon4.addPixmap(QPixmap(":/images/folder-draft24.png"),QIcon::Selected,QIcon::On) ; + + hideChatTextToggleButton = new QToolButton ; + hideChatTextToggleButton->setMinimumSize(QSize(44,44)) ; + hideChatTextToggleButton->setMaximumSize(QSize(44,44)) ; + hideChatTextToggleButton->setText(QString()) ; + hideChatTextToggleButton->setToolTip(tr("Hide Chat Text")); + hideChatTextToggleButton->setIcon(icon4) ; + hideChatTextToggleButton->setIconSize(QSize(42,42)) ; + hideChatTextToggleButton->setAutoRaise(true) ; + hideChatTextToggleButton->setCheckable(true) ; + hideChatTextToggleButton->setEnabled(false) ; + connect(audioListenToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioListen())); connect(audioCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioCapture())); connect(hangupButton, SIGNAL(clicked()), this , SLOT(hangupCall())); + connect(videoCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleVideoCapture())); + connect(hideChatTextToggleButton, SIGNAL(clicked()), this , SLOT(toggleHideChatText())); - mChatWidget->addVOIPBarWidget(audioListenToggleButton) ; - mChatWidget->addVOIPBarWidget(audioCaptureToggleButton) ; - mChatWidget->addVOIPBarWidget(hangupButton) ; - mChatWidget->addVOIPBarWidget(videoCaptureToggleButton) ; + mChatWidget->addTitleBarWidget(audioListenToggleButton) ; + mChatWidget->addTitleBarWidget(audioCaptureToggleButton) ; + mChatWidget->addTitleBarWidget(hangupButton) ; + mChatWidget->addTitleBarWidget(videoCaptureToggleButton) ; + mChatWidget->addTitleBarWidget(hideChatTextToggleButton) ; outputAudioProcessor = NULL ; outputAudioDevice = NULL ; @@ -252,6 +272,7 @@ void VOIPChatWidgetHolder::toggleVideoCapture() { if (videoCaptureToggleButton->isChecked()) { + hideChatTextToggleButton->setEnabled(true); //activate video input // videoWidget->show(); @@ -272,6 +293,9 @@ void VOIPChatWidgetHolder::toggleVideoCapture() } else { + hideChatTextToggleButton->setEnabled(false); + hideChatTextToggleButton->setChecked(false); + toggleHideChatText(); inputVideoDevice->stop() ; videoCaptureToggleButton->setToolTip(tr("Activate camera")); outputVideoDevice->showFrameOff(); @@ -331,6 +355,17 @@ void VOIPChatWidgetHolder::addVideoData(const RsPeerId &peer_id, QByteArray* arr } } +void VOIPChatWidgetHolder::toggleHideChatText() +{ + if (hideChatTextToggleButton->isChecked()) { + mChatWidget->hideChatText(true); + hideChatTextToggleButton->setToolTip(tr("Show Chat Text")); + } else { + mChatWidget->hideChatText(false); + hideChatTextToggleButton->setToolTip(tr("Hide Chat Text")); + } +} + void VOIPChatWidgetHolder::botMouseEnter() { RSButtonOnText *source = qobject_cast(QObject::sender()); diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.h b/plugins/VOIP/gui/VOIPChatWidgetHolder.h index 350f49f2c..d0dd82e61 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.h +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.h @@ -62,6 +62,7 @@ private slots: void toggleAudioListen(); void toggleAudioCapture(); void toggleVideoCapture(); + void toggleHideChatText(); void hangupCall() ; void botMouseEnter(); void botMouseLeave(); @@ -87,6 +88,7 @@ protected: QToolButton *audioListenToggleButton ; QToolButton *audioCaptureToggleButton ; QToolButton *videoCaptureToggleButton ; + QToolButton *hideChatTextToggleButton ; QToolButton *hangupButton ; typedef QMap button_map; diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index ba9a6b484..3aa2b5189 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -214,7 +214,7 @@ void ChatWidget::setDefaultExtraFileFlags(TransferRequestFlags fl) void ChatWidget::addChatHorizontalWidget(QWidget *w) { - ui->verticalLayout_2->addWidget(w) ; + ui->vl_Plugins->addWidget(w) ; update() ; } @@ -223,9 +223,14 @@ void ChatWidget::addChatBarWidget(QWidget *w) ui->pluginButtonFrame->layout()->addWidget(w) ; } -void ChatWidget::addVOIPBarWidget(QWidget *w) +void ChatWidget::addTitleBarWidget(QWidget *w) { - ui->titleBarFrame->layout()->addWidget(w) ; + ui->pluginTitleFrame->layout()->addWidget(w) ; +} + +void ChatWidget::hideChatText(bool hidden) +{ + ui->frame_ChatText->setHidden(hidden); ; } RSButtonOnText* ChatWidget::getNewButtonOnTextBrowser() diff --git a/retroshare-gui/src/gui/chat/ChatWidget.h b/retroshare-gui/src/gui/chat/ChatWidget.h index 312f9d879..6d041e493 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.h +++ b/retroshare-gui/src/gui/chat/ChatWidget.h @@ -108,9 +108,8 @@ public: // Adds one widget in the chat bar. Used to add e.g. new buttons. The widget should be // small enough in size. void addChatBarWidget(QWidget *w) ; - - - void addVOIPBarWidget(QWidget *w); + void addTitleBarWidget(QWidget *w); + void hideChatText(bool hidden); RSButtonOnText* getNewButtonOnTextBrowser(); RSButtonOnText* getNewButtonOnTextBrowser(QString text); diff --git a/retroshare-gui/src/gui/chat/ChatWidget.ui b/retroshare-gui/src/gui/chat/ChatWidget.ui index 02b3f9afc..4fe128b8d 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.ui +++ b/retroshare-gui/src/gui/chat/ChatWidget.ui @@ -17,13 +17,522 @@ 0 - - + + + + 2 + + + + + + 20 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 178 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 178 + + + + + + + + + 255 + 255 + 178 + + + + + + + 255 + 255 + 178 + + + + + + + + true + + + QFrame::Box + + + + 6 + + + + + + 16 + 16 + + + + + + + :/images/info16.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + TextLabel + + + + + + + + 16 + 16 + + + + Qt::NoFocus + + + Close + + + QToolButton +{ + border-image: url(:/images/closenormal.png) +} + +QToolButton:hover +{ +border-image: url(:/images/closehover.png) +} + +QToolButton:pressed { +border-image: url(:/images/closepressed.png) +} + + + true + + + + + + + + + + Qt::Vertical + + + 2 + + + false + + + + + 0 + 0 + + + + + 0 + 30 + + + + Qt::CustomContextMenu + + + + + + 0 + + + + + + + + 18 + 18 + + + + + 18 + 18 + + + + T + + + Qt::AlignCenter + + + + + + + + 400 + 18 + + + + 0 + + + 3 + + + + + + + + + + 0 + 0 + + + + + 0 + 30 + + + + Type a message here + + + + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 2 + + + + + + 0 + 0 + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + + :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png + + + + 24 + 24 + + + + true + + + + + + + + 32 + 28 + + + + + 32 + 28 + + + + Qt::TabFocus + + + Set text font & color + + + + :/images/textedit/format-text-color.png:/images/textedit/format-text-color.png + + + + 24 + 24 + + + + QToolButton::InstantPopup + + + true + + + + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + Attach a Picture + + + + :/images/add_image24.png:/images/add_image24.png + + + + 24 + 24 + + + + true + + + + + + + + 28 + 28 + + + + Qt::NoFocus + + + Attach a File + + + + :/images/attach.png:/images/attach.png + + + + 24 + 24 + + + + true + + + + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + + :/images/configure.png:/images/configure.png + + + + 24 + 24 + + + + QToolButton::InstantPopup + + + true + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + + 2 + + + + + + + + Qt::Horizontal + + + + 190 + 25 + + + + + + + + Send + + + + + + + + + + true + + + + + + + + + + + + QLayout::SetMaximumSize + + + + 0 + 0 + + + + + 16777215 + 64 + + QFrame::Box @@ -103,6 +612,21 @@ + + + + QFrame::NoFrame + + + QFrame::Plain + + + + 2 + + + + @@ -295,478 +819,6 @@ - - - - true - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 178 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 178 - - - - - - - - - 255 - 255 - 178 - - - - - - - 255 - 255 - 178 - - - - - - - - true - - - QFrame::Box - - - - 6 - - - - - - 16 - 16 - - - - - - - :/images/info16.png - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - TextLabel - - - - - - - - 16 - 16 - - - - Qt::NoFocus - - - Close - - - QToolButton -{ - border-image: url(:/images/closenormal.png) -} - -QToolButton:hover -{ -border-image: url(:/images/closehover.png) -} - -QToolButton:pressed { -border-image: url(:/images/closepressed.png) -} - - - true - - - - - - - - - - Qt::Vertical - - - 2 - - - false - - - - - 0 - 0 - - - - - 0 - 30 - - - - Qt::CustomContextMenu - - - - - - 0 - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - 18 - 18 - - - - - 18 - 18 - - - - T - - - Qt::AlignCenter - - - - - - - 0 - - - 3 - - - - 400 - 18 - - - - - - - - - - - 0 - 0 - - - - - 0 - 30 - - - - Type a message here - - - - - - - - - - - QFrame::Box - - - QFrame::Sunken - - - - 2 - - - - - - 0 - 0 - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - - :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png - - - - 24 - 24 - - - - true - - - - - - - - 32 - 28 - - - - - 32 - 28 - - - - Qt::TabFocus - - - Set text font & color - - - - :/images/textedit/format-text-color.png:/images/textedit/format-text-color.png - - - - 24 - 24 - - - - QToolButton::InstantPopup - - - true - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Attach a Picture - - - - :/images/add_image24.png:/images/add_image24.png - - - - 24 - 24 - - - - true - - - - - - - - 28 - 28 - - - - Qt::NoFocus - - - Attach a File - - - - :/images/attach.png:/images/attach.png - - - - 24 - 24 - - - - true - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - - :/images/configure.png:/images/configure.png - - - - 24 - 24 - - - - QToolButton::InstantPopup - - - true - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - - 2 - - - - - - - - Qt::Horizontal - - - - 190 - 25 - - - - - - - - Send - - - - - -