rework PlaylistWindow: move handling of visibilitychanges into Playlistwindow

and rely on signals and slots to get rid of MainWindow::togglePL().
cleaned up some unnecessary includes
This commit is contained in:
Thomas Frauendorfer 2008-02-01 05:16:32 +01:00
parent b10ef97cfc
commit a228d7a01b
14 changed files with 121 additions and 106 deletions

View file

@ -219,10 +219,12 @@ MainDisplay::SetupToggleButtons (void)
m_pls = new ToggleButton (this, Skin::PLS_ON_0, Skin::PLS_ON_1,
Skin::PLS_OFF_0, Skin::PLS_OFF_1);
m_pls->move(242, 58);
if (!s.value ("playlist/hidden").toBool ())
m_pls->toggle ();
m_pls->setChecked (m_mw->getPL ()->isVisible ());
connect (m_pls, SIGNAL (toggled (bool)),
m_mw->getPL (), SLOT (setVisible (bool)));
connect (m_mw->getPL (), SIGNAL (visibilityChanged (bool)),
m_pls, SLOT (setChecked (bool)));
connect (m_pls, SIGNAL(clicked()), this, SLOT(togglePL()));
m_eq = new ToggleButton (this, Skin::EQ_ON_0, Skin::EQ_ON_1,
Skin::EQ_OFF_0, Skin::EQ_OFF_1);
@ -244,12 +246,6 @@ MainDisplay::SetupToggleButtons (void)
m_repeat->setEnabled(false); // FIXME: Disabled button for now, not yet implemented
}
void
MainDisplay::togglePL (void)
{
m_mw->togglePL(false);
}
void
MainDisplay::toggleEQ (void)
{