1510
by Michael Pyne
Big huge update. |
1 |
/***************************************************************************
|
1561
by Scott Wheeler
Since the annotate is going to be screwed anyway by the time this is ported, |
2 |
begin : Sat Jul 9 2005
|
1510
by Michael Pyne
Big huge update. |
3 |
copyright : (C) 2005 by Michael Pyne
|
4 |
email : michael.pyne@kdemail.net
|
|
5 |
***************************************************************************/
|
|
6 |
||
7 |
/***************************************************************************
|
|
8 |
* *
|
|
9 |
* This program is free software; you can redistribute it and/or modify *
|
|
10 |
* it under the terms of the GNU General Public License as published by *
|
|
11 |
* the Free Software Foundation; either version 2 of the License, or *
|
|
12 |
* (at your option) any later version. *
|
|
13 |
* *
|
|
14 |
***************************************************************************/
|
|
15 |
||
16 |
#include "covericonview.h" |
|
17 |
#include "covermanager.h" |
|
18 |
||
19 |
using CoverUtility::CoverIconViewItem; |
|
20 |
||
1530
by Laurent Montel
qt3to4 + my script |
21 |
CoverIconViewItem::CoverIconViewItem(coverKey id, Q3IconView *parent) : |
1579
by Laurent Montel
adapt to new kdelis api |
22 |
K3IconViewItem(parent), m_id(id) |
1510
by Michael Pyne
Big huge update. |
23 |
{
|
24 |
CoverDataPtr data = CoverManager::coverInfo(id); |
|
25 |
setText(QString("%1 - %2").arg(data->artist, data->album)); |
|
26 |
setPixmap(data->thumbnail()); |
|
27 |
}
|
|
28 |
||
1579
by Laurent Montel
adapt to new kdelis api |
29 |
CoverIconView::CoverIconView(QWidget *parent, const char *name) : K3IconView(parent, name) |
1510
by Michael Pyne
Big huge update. |
30 |
{
|
31 |
setResizeMode(Adjust); |
|
32 |
}
|
|
33 |
||
34 |
CoverIconViewItem *CoverIconView::currentItem() const |
|
35 |
{
|
|
1579
by Laurent Montel
adapt to new kdelis api |
36 |
return static_cast<CoverIconViewItem *>(K3IconView::currentItem()); |
1510
by Michael Pyne
Big huge update. |
37 |
}
|
38 |
||
1530
by Laurent Montel
qt3to4 + my script |
39 |
Q3DragObject *CoverIconView::dragObject() |
1510
by Michael Pyne
Big huge update. |
40 |
{
|
1952
by Michael Pyne
More --qt3support: |
41 |
#if 0
|
42 |
// Temporarily disabled pending conversion of the cover manager icon view
|
|
43 |
// to Qt 4 ish stuff.
|
|
1510
by Michael Pyne
Big huge update. |
44 |
CoverIconViewItem *item = currentItem();
|
45 |
if(item)
|
|
1561
by Scott Wheeler
Since the annotate is going to be screwed anyway by the time this is ported, |
46 |
return new CoverDrag(item->id(), this);
|
1952
by Michael Pyne
More --qt3support: |
47 |
#endif
|
1510
by Michael Pyne
Big huge update. |
48 |
return 0; |
49 |
}
|
|
50 |
||
1562
by Michael Pyne
Since we're standardizing the source style, figured I'd throw in the Big Huge Vim Modeline |
51 |
// vim: set et sw=4 tw=0 sta:
|