Commit 633a873b authored by Michael Pyne's avatar Michael Pyne

--qt3support (specifically Q3HBox)

svn path=/trunk/KDE/kdemultimedia/juk/; revision=912708
parent 675d5918
......@@ -59,24 +59,29 @@ struct Line : public QFrame
// NowPlaying
////////////////////////////////////////////////////////////////////////////////
NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const char *name) :
Q3HBox(parent, name),
NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection) :
QWidget(parent),
m_observer(this, collection),
m_collection(collection)
{
setObjectName("NowPlaying");
// m_observer is set to watch the PlaylistCollection, also watch for
// changes that come from CollectionList.
CollectionList::instance()->addObserver(&m_observer);
layout()->setMargin(0);
layout()->setSpacing(3);
setFixedHeight(imageSize + 2 + layout()->margin() * 2);
QHBoxLayout *layout = new QHBoxLayout(this);
setLayout(layout);
layout->setMargin(0);
layout->setSpacing(3);
setFixedHeight(imageSize + 2);
setStretchFactor(new CoverItem(this), 0);
setStretchFactor(new TrackItem(this), 2);
setStretchFactor(new Line(this), 0);
setStretchFactor(new HistoryItem(this), 1);
layout->addWidget(new CoverItem(this), 0);
layout->addWidget(new TrackItem(this), 2);
layout->addWidget(new Line(this), 0);
layout->addWidget(new HistoryItem(this), 1);
connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotUpdate()));
connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotUpdate()));
......
......@@ -16,7 +16,7 @@
#ifndef NOWPLAYING_H
#define NOWPLAYING_H
#include <Q3HBox>
#include <QWidget>
#include <QLabel>
#include <QPointer>
#include <QList>
......@@ -36,13 +36,12 @@ class Playlist;
* when the playing item changes.
*/
class NowPlaying : public Q3HBox
class NowPlaying : public QWidget
{
Q_OBJECT
public:
NowPlaying(QWidget *parent, PlaylistCollection *collection,
const char *name = 0);
NowPlaying(QWidget *parent, PlaylistCollection *collection);
void addItem(NowPlayingItem *item);
PlaylistCollection *collection() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment