Enable Drag and Drop in playlist

This commit is contained in:
Thomas Frauendorfer 2008-01-26 05:13:42 +01:00
parent 38218a7057
commit e677ad6f83
25 changed files with 18 additions and 6 deletions

View file

@ -214,16 +214,19 @@ MainDisplay::SetupToggleButtons (void)
m_eq->move(219, 58);
if (!s.value ("equalizer/hidden").toBool ())
m_pls->toggleOn ();
m_eq->setEnabled(false); // FIXME: Disabled for now, equalizer is not yet usable
connect (m_eq, SIGNAL(clicked()), this, SLOT(toggleEQ()));
m_shuffle = new ToggleButton (this, Skin::SHUFFLE_ON_0, Skin::SHUFFLE_ON_1,
Skin::SHUFFLE_OFF_0, Skin::SHUFFLE_OFF_1);
m_shuffle->move(164, 89);
m_shuffle->setEnabled(false); // FIXME: Disabled button for now, not yet implemented
m_repeat = new ToggleButton (this, Skin::REPEAT_ON_0, Skin::REPEAT_ON_1,
Skin::REPEAT_OFF_0, Skin::REPEAT_OFF_1);
m_repeat->move(210, 89);
m_repeat->setEnabled(false); // FIXME: Disabled button for now, not yet implemented
}
void

View file

@ -80,9 +80,8 @@ PlaylistView::PlaylistView (QWidget *parent) : QListView (parent)
setAttribute (Qt::WA_NoBackground);
// TODO make drag and drop work
//setDragEnabled(true);
//setAcceptDrops(true);
//setDropIndicatorShown (true);
setDragEnabled(true);
setAcceptDrops(true);
// end DragandDrop
setFrameStyle(QFrame::NoFrame);
setFocusPolicy (Qt::StrongFocus);
@ -147,12 +146,13 @@ PlaylistView::contextMenuEvent (QContextMenuEvent *e)
a = new QAction (tr ("Show file info"), this);
a->setShortcut (tr ("Ctrl+Enter"));
// connect (a, SIGNAL (triggered ()), this, SLOT (showMlib ()));
a->setEnabled(false); // FIXME: Disabled for now
qm.addAction (a);
qm.addSeparator ();
a = new QAction (tr ("Add file"), this);
a->setShortcut (tr ("Ctrl+F"));
a->setEnabled(false); // FIXME: Disabled for now
qm.addAction (a);
a = new QAction (tr ("Remove selected"), this);
@ -162,6 +162,8 @@ PlaylistView::contextMenuEvent (QContextMenuEvent *e)
qm.addSeparator ();
a = new QAction (tr ("Medialib browser"), this);
// connect (a, SIGNAL (triggered ()), this, SLOT (showMlib ()));
a->setEnabled(false); //FIXME: Disabled for now
qm.addAction (a);
e->accept ();