Enable Drag and Drop in playlist
1
TODO
|
@ -18,6 +18,7 @@ Todo:
|
|||
* Manage with faulty skins
|
||||
* make cool effects when switching skin?
|
||||
* Medialib browser
|
||||
+ Make it work again
|
||||
* Keep it very simple
|
||||
* browse by album art
|
||||
* Textbox
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
DEFINES += PROMOE_VERSION="\"\\\"0.1-dev\\\"\""
|
||||
|
||||
DEPENDPATH += $PWD/src $PWD/lib
|
||||
INCLUDEPATH += $$PWD/src $$PWD/lib
|
||||
|
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
@ -494,6 +494,10 @@ PlaylistModel::headerData (int section, Qt::Orientation orientation, int role) c
|
|||
Qt::ItemFlags
|
||||
PlaylistModel::flags (const QModelIndex &idx) const
|
||||
{
|
||||
// TODO: For now a workaround to enable drag and drop in promoe
|
||||
if (!idx.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
unsigned int id = m_plist[idx.row ()];
|
||||
PlaylistModel *fake = const_cast<PlaylistModel*> (this);
|
||||
QHash<QString, QVariant> d = fake->m_client->cache ()->get_info (id);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ();
|
||||
|
|