diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-11-07 18:03:14 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2007-11-07 18:03:14 +0000 |
| commit | 1e7a7fdfdf6859e016cc715aace8d0ecb0e3a761 (patch) | |
| tree | 0cc1bdc55fa4dc553490185fed0eceb644a5a082 /src/display.cpp | |
| parent | f70c0765539a3482bb3f1cda24fd4776ae4aad20 (diff) | |
| download | qmmp-1e7a7fdfdf6859e016cc715aace8d0ecb0e3a761.tar.gz qmmp-1e7a7fdfdf6859e016cc715aace8d0ecb0e3a761.tar.bz2 qmmp-1e7a7fdfdf6859e016cc715aace8d0ecb0e3a761.zip | |
added close buttons to equalizer and playlist
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@180 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/display.cpp')
| -rw-r--r-- | src/display.cpp | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/src/display.cpp b/src/display.cpp index 512599736..d2cce8165 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -168,14 +168,16 @@ void MainDisplay::setEQ ( QWidget* w ) { m_equlizer = w; m_eqButton->setON ( m_equlizer->isVisible() ); - connect ( m_eqButton, SIGNAL ( clicked ( bool ) ), m_equlizer, SLOT ( setVisible ( bool ) ) ); + connect (m_eqButton, SIGNAL (clicked(bool)), m_equlizer, SLOT (setVisible (bool))); + connect (m_equlizer, SIGNAL (closed ()), m_eqButton, SLOT (click())); } void MainDisplay::setPL ( QWidget* w ) { m_playlist = w; m_plButton->setON ( m_playlist->isVisible() ); - connect ( m_plButton, SIGNAL ( clicked ( bool ) ), m_playlist, SLOT ( setVisible ( bool ) ) ); + connect (m_plButton, SIGNAL (clicked (bool)), m_playlist, SLOT (setVisible (bool))); + connect (m_playlist, SIGNAL (closed ()), m_plButton, SLOT (click())); } void MainDisplay::setInfo(const OutputState &st) @@ -185,39 +187,39 @@ void MainDisplay::setInfo(const OutputState &st) switch ( ( int ) st.type() ) { case OutputState::Info: - { - //if ( seeking ) - // break; - setTime ( st.elapsedSeconds() ); - m_kbps->display ( st.bitrate() ); - m_freq->display ( st.frequency() /1000 ); - m_monoster->setChannels ( st.channels() ); - update(); - break; - } + { + //if ( seeking ) + // break; + setTime ( st.elapsedSeconds() ); + m_kbps->display ( st.bitrate() ); + m_freq->display ( st.frequency() /1000 ); + m_monoster->setChannels ( st.channels() ); + update(); + break; + } case OutputState::Playing: - { - m_playstatus->setStatus(PlayStatus::PLAY); - m_timeIndicator->setNeedToShowTime(true); - break; - } + { + m_playstatus->setStatus(PlayStatus::PLAY); + m_timeIndicator->setNeedToShowTime(true); + break; + } case OutputState::Buffering: - { - //ui.label->setText("Buffering"); - break; - } + { + //ui.label->setText("Buffering"); + break; + } case OutputState::Paused: - { - m_playstatus->setStatus(PlayStatus::PAUSE); - break; - } + { + m_playstatus->setStatus(PlayStatus::PAUSE); + break; + } case OutputState::Stopped: - { - m_playstatus->setStatus(PlayStatus::STOP); - m_monoster->setChannels (0); - //m_timeIndicator->setNeedToShowTime(false); - break; - } + { + m_playstatus->setStatus(PlayStatus::STOP); + m_monoster->setChannels (0); + //m_timeIndicator->setNeedToShowTime(false); + break; + } case OutputState::Volume: //qDebug("volume %d, %d", st.rightVolume(), st.leftVolume()); int maxVol = qMax(st.leftVolume(),st.rightVolume()); @@ -276,10 +278,9 @@ void MainDisplay::hideTimeDisplay() } - void MainDisplay::mousePressEvent(QMouseEvent *e) { - if( e->button() == Qt::RightButton) + if ( e->button() == Qt::RightButton) { m_mw->menu()->exec(e->globalPos()); } |
