~ubuntu-branches/ubuntu/natty/kdemultimedia/natty-proposed

« back to all changes in this revision

Viewing changes to kscd/gui/mutebutton.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers
  • Date: 2011-05-26 02:41:36 UTC
  • mfrom: (0.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 108.
  • Revision ID: james.westby@ubuntu.com-20110526024136-jjwsigfy402jhupm
Tags: upstream-4.6.3
ImportĀ upstreamĀ versionĀ 4.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "mutebutton.h"
34
34
#include <KLocale>
35
35
 
36
 
MuteButton::MuteButton(QWidget * parent):KscdWidget(I18N_NOOP("mute"),parent)
 
36
MuteButton::MuteButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "mute" )),parent)
37
37
{
38
38
}
39
39
 
46
46
        if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft()))
47
47
        {
48
48
                event->accept();
49
 
                m_state = "pressed";
50
 
                if(m_name== "mute")
51
 
                {
52
 
                        m_id = m_name + '_' + m_state;
53
 
                        emit(needRepaint());
54
 
                }
55
 
                else
56
 
                {
57
 
                        m_id = m_name + '_' + m_state;
58
 
                        emit(needRepaint());
59
 
                }
 
49
                m_state = QLatin1String( "pressed" );
 
50
                m_id = m_name + QLatin1Char( '_' ) + m_state;
 
51
                emit(needRepaint());
60
52
        }
61
53
        else
62
54
        {
69
61
        if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft()))
70
62
        {
71
63
                event->accept();
72
 
                m_state = "over";
73
 
                if(m_name=="mute")
 
64
                m_state = QLatin1String( "over" );
 
65
                if(m_name==QLatin1String( "mute" ))
74
66
                {
75
 
                        m_name = "unmute";
76
 
                        m_id = m_name + '_' + m_state;
77
 
                        emit(buttonClicked(m_name));
 
67
                        m_name = I18N_NOOP(QLatin1String( "unmute" ));
78
68
                }
79
69
                else
80
70
                {
81
 
                        m_name = "mute";
82
 
                        m_id = m_name + '_' + m_state;
83
 
                        emit(buttonClicked(m_name));
 
71
                        m_name = I18N_NOOP(QLatin1String( "mute" ));
84
72
                }
 
73
                m_id = m_name + QLatin1Char( '_' ) + m_state;
 
74
                emit(buttonClicked(m_name));
85
75
        }
86
76
}