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:
thunder2 2013-10-04 12:13:09 +00:00
parent 9ca0775933
commit b49ba8b98f
4 changed files with 22 additions and 18 deletions

View File

@ -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()) ;
@ -28,10 +28,10 @@ AudioPopupChatDialog::AudioPopupChatDialog(QWidget *parent)
audioListenToggleButton->setIcon(icon) ;
audioListenToggleButton->setIconSize(QSize(22,22)) ;
audioListenToggleButton->setFlat(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()) ;
@ -46,7 +46,7 @@ AudioPopupChatDialog::AudioPopupChatDialog(QWidget *parent)
audioMuteCaptureToggleButton->setIcon(icon2) ;
audioMuteCaptureToggleButton->setIconSize(QSize(22,22)) ;
audioMuteCaptureToggleButton->setFlat(true) ;
audioMuteCaptureToggleButton->setAutoRaise(true) ;
audioMuteCaptureToggleButton->setCheckable(true) ;
connect(audioListenToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioListen()));

View File

@ -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 ;
};

View File

@ -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)"));
{

View File

@ -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;