mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Changed the additional buttons of ChatLobbyDialog and AudioPopupChatDialog to QToolButton.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6798 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9ca0775933
commit
b49ba8b98f
@ -1,4 +1,4 @@
|
||||
#include <QPushButton>
|
||||
#include <QToolButton>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QIcon>
|
||||
#include "AudioPopupChatDialog.h"
|
||||
@ -11,7 +11,7 @@
|
||||
AudioPopupChatDialog::AudioPopupChatDialog(QWidget *parent)
|
||||
: PopupChatDialog(parent)
|
||||
{
|
||||
audioListenToggleButton = new QPushButton ;
|
||||
audioListenToggleButton = new QToolButton ;
|
||||
audioListenToggleButton->setMinimumSize(QSize(28,28)) ;
|
||||
audioListenToggleButton->setMaximumSize(QSize(28,28)) ;
|
||||
audioListenToggleButton->setText(QString()) ;
|
||||
@ -20,34 +20,34 @@ AudioPopupChatDialog::AudioPopupChatDialog(QWidget *parent)
|
||||
std::cerr << "****** VOIPLugin: Creating new AudioPopupChatDialog !!" << std::endl;
|
||||
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/images/deafened_self.svg")) ;
|
||||
icon.addPixmap(QPixmap(":/images/deafened_self.svg")) ;
|
||||
icon.addPixmap(QPixmap(":/images/self_undeafened.svg"),QIcon::Normal,QIcon::On) ;
|
||||
icon.addPixmap(QPixmap(":/images/self_undeafened.svg"),QIcon::Disabled,QIcon::On) ;
|
||||
icon.addPixmap(QPixmap(":/images/self_undeafened.svg"),QIcon::Active,QIcon::On) ;
|
||||
icon.addPixmap(QPixmap(":/images/self_undeafened.svg"),QIcon::Selected,QIcon::On) ;
|
||||
icon.addPixmap(QPixmap(":/images/self_undeafened.svg"),QIcon::Selected,QIcon::On) ;
|
||||
|
||||
audioListenToggleButton->setIcon(icon) ;
|
||||
audioListenToggleButton->setIconSize(QSize(22,22)) ;
|
||||
audioListenToggleButton->setFlat(true) ;
|
||||
audioListenToggleButton->setCheckable(true);
|
||||
audioListenToggleButton->setAutoRaise(true) ;
|
||||
audioListenToggleButton->setCheckable(true);
|
||||
|
||||
audioMuteCaptureToggleButton = new QPushButton ;
|
||||
audioMuteCaptureToggleButton = new QToolButton ;
|
||||
audioMuteCaptureToggleButton->setMinimumSize(QSize(28,28)) ;
|
||||
audioMuteCaptureToggleButton->setMaximumSize(QSize(28,28)) ;
|
||||
audioMuteCaptureToggleButton->setText(QString()) ;
|
||||
audioMuteCaptureToggleButton->setToolTip(tr("Start Call"));
|
||||
|
||||
QIcon icon2 ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-start-22.png")) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-start-22.png")) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-stop-22.png"),QIcon::Normal,QIcon::On) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-stop-22.png"),QIcon::Disabled,QIcon::On) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-stop-22.png"),QIcon::Active,QIcon::On) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-stop-22.png"),QIcon::Selected,QIcon::On) ;
|
||||
icon2.addPixmap(QPixmap(":/images/call-stop-22.png"),QIcon::Selected,QIcon::On) ;
|
||||
|
||||
audioMuteCaptureToggleButton->setIcon(icon2) ;
|
||||
audioMuteCaptureToggleButton->setIconSize(QSize(22,22)) ;
|
||||
audioMuteCaptureToggleButton->setFlat(true) ;
|
||||
audioMuteCaptureToggleButton->setCheckable(true) ;
|
||||
audioMuteCaptureToggleButton->setAutoRaise(true) ;
|
||||
audioMuteCaptureToggleButton->setCheckable(true) ;
|
||||
|
||||
connect(audioListenToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioListen()));
|
||||
connect(audioMuteCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioMuteCapture()));
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <gui/chat/PopupChatDialog.h>
|
||||
#include <gui/audiodevicehelper.h>
|
||||
|
||||
class QPushButton;
|
||||
class QToolButton;
|
||||
|
||||
#define VOIP_SOUND_INCOMING_CALL "VOIP_incoming_call"
|
||||
|
||||
@ -37,7 +37,7 @@ class AudioPopupChatDialog: public PopupChatDialog
|
||||
|
||||
virtual void updateStatus(int status) ;
|
||||
|
||||
QPushButton *audioListenToggleButton ;
|
||||
QPushButton *audioMuteCaptureToggleButton ;
|
||||
QToolButton *audioListenToggleButton ;
|
||||
QToolButton *audioMuteCaptureToggleButton ;
|
||||
};
|
||||
|
||||
|
@ -66,10 +66,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WF
|
||||
|
||||
// Add a button to invite friends.
|
||||
//
|
||||
inviteFriendsButton = new QPushButton ;
|
||||
inviteFriendsButton = new QToolButton ;
|
||||
inviteFriendsButton->setMinimumSize(QSize(28,28)) ;
|
||||
inviteFriendsButton->setMaximumSize(QSize(28,28)) ;
|
||||
inviteFriendsButton->setText(QString()) ;
|
||||
inviteFriendsButton->setAutoRaise(true) ;
|
||||
inviteFriendsButton->setToolTip(tr("Invite friends to this lobby"));
|
||||
|
||||
{
|
||||
@ -83,10 +84,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WF
|
||||
|
||||
getChatWidget()->addChatBarWidget(inviteFriendsButton) ;
|
||||
|
||||
unsubscribeButton = new QPushButton ;
|
||||
unsubscribeButton = new QToolButton ;
|
||||
unsubscribeButton->setMinimumSize(QSize(28,28)) ;
|
||||
unsubscribeButton->setMaximumSize(QSize(28,28)) ;
|
||||
unsubscribeButton->setText(QString()) ;
|
||||
unsubscribeButton->setAutoRaise(true) ;
|
||||
unsubscribeButton->setToolTip(tr("Leave this lobby (Unsubscribe)"));
|
||||
|
||||
{
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "ui_ChatLobbyDialog.h"
|
||||
#include "ChatDialog.h"
|
||||
|
||||
class QToolButton;
|
||||
|
||||
class ChatLobbyDialog: public ChatDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -85,8 +87,8 @@ private:
|
||||
QString _lobby_name ;
|
||||
time_t lastUpdateListTime;
|
||||
|
||||
QPushButton *inviteFriendsButton ;
|
||||
QPushButton *unsubscribeButton ;
|
||||
QToolButton *inviteFriendsButton ;
|
||||
QToolButton *unsubscribeButton ;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::ChatLobbyDialog ui;
|
||||
|
Loading…
Reference in New Issue
Block a user