aboutsummaryrefslogtreecommitdiff
path: root/src/ui/display.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-14 21:06:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-14 21:06:54 +0000
commit2295f52f60451b514bcb125c17a9108af8f457a5 (patch)
treedb38cbb0142d7498caf95f7cc42301be596837cf /src/ui/display.cpp
parent711b206b832e075e52c5da73f6b21c8369b23ac4 (diff)
downloadqmmp-2295f52f60451b514bcb125c17a9108af8f457a5.tar.gz
qmmp-2295f52f60451b514bcb125c17a9108af8f457a5.tar.bz2
qmmp-2295f52f60451b514bcb125c17a9108af8f457a5.zip
added 'show playlist' and 'show equalizer' hotkeys
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1986 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/display.cpp')
-rw-r--r--src/ui/display.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/ui/display.cpp b/src/ui/display.cpp
index e86f873ad..d8897d0a4 100644
--- a/src/ui/display.cpp
+++ b/src/ui/display.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2008 by Ilya Kotov *
+ * Copyright (C) 2006-2010 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -39,6 +39,7 @@
#include "balancebar.h"
#include "mainwindow.h"
#include "timeindicator.h"
+#include "actionmanager.h"
#include "display.h"
MainDisplay::MainDisplay (QWidget *parent)
@@ -236,19 +237,37 @@ void MainDisplay::setSampleRate(quint32 rate)
{
m_freq->display((int) rate/1000);
}
-
+//TODO optimize this connections
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_equlizer, SIGNAL (closed ()), m_eqButton, SLOT (click()));
+ ACTION(ActionManager::SHOW_EQUALIZER)->setChecked(m_equlizer->isVisible());
+
+ connect (ACTION(ActionManager::SHOW_EQUALIZER), SIGNAL(triggered(bool)),
+ m_equlizer, SLOT (setVisible (bool)));
+ connect (ACTION(ActionManager::SHOW_EQUALIZER), SIGNAL(triggered(bool)),
+ m_eqButton, SLOT (setON (bool)));
+
+ connect (m_eqButton, SIGNAL(clicked(bool)),
+ ACTION(ActionManager::SHOW_EQUALIZER), SLOT(setChecked (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());
+ ACTION(ActionManager::SHOW_PLAYLIST)->setChecked(m_playlist->isVisible());
+
+ connect (ACTION(ActionManager::SHOW_PLAYLIST), SIGNAL(triggered(bool)),
+ m_playlist, SLOT (setVisible (bool)));
+ connect (ACTION(ActionManager::SHOW_PLAYLIST), SIGNAL(triggered(bool)),
+ m_plButton, SLOT (setON (bool)));
+
+ connect (m_plButton, SIGNAL(clicked(bool)),
+ ACTION(ActionManager::SHOW_PLAYLIST), SLOT(setChecked (bool)));
connect (m_plButton, SIGNAL (clicked (bool)), m_playlist, SLOT (setVisible (bool)));
connect (m_playlist, SIGNAL (closed ()), m_plButton, SLOT (click()));
}