Commit 1042207e authored by Scott Wheeler's avatar Scott Wheeler

Clean up includes, don't declare things as member variables if we're only

using them in one method, use forward declarations where possible, etc.

CCMAIL:Nathan Toone <nathan@toonetown.com>

svn path=/trunk/kdemultimedia/juk/; revision=361800
parent 4c6adfe7
......@@ -12,7 +12,6 @@
* *
***************************************************************************/
#include <kdebug.h>
#include <kiconloader.h>
#include <kactionclasses.h>
#include <kconfig.h>
......@@ -22,10 +21,11 @@
#include <qsize.h>
#include <qsizepolicy.h>
#include <qpixmap.h>
#include <qbutton.h>
#include <qimage.h>
#include <qvaluelist.h>
#include <qsplitter.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include "nowplaying.h"
#include "playermanager.h"
......@@ -39,7 +39,7 @@ using namespace ActionCollection;
// public members
////////////////////////////////////////////////////////////////////////////////
NowPlaying::NowPlaying(QWidget *parent, const char *name) :
NowPlaying::NowPlaying(QSplitter *parent, const char *name) :
QWidget(parent, name),
m_button(0)
{
......@@ -186,4 +186,3 @@ void NowPlaying::setupLayout()
}
#include "nowplaying.moc"
......@@ -16,17 +16,16 @@
#define NOWPLAYING_H
#include <qwidget.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qtimer.h>
class QPushButton;
class QSplitter;
class NowPlaying : public QWidget
{
Q_OBJECT
public:
NowPlaying(QWidget *parent = 0, const char *name = 0);
NowPlaying(QSplitter *parent, const char *name = 0);
virtual ~NowPlaying();
private:
......@@ -44,7 +43,7 @@ private slots:
protected:
virtual void resizeEvent(QResizeEvent *ev);
virtual void mousePressEvent ( QMouseEvent * e );
virtual void mousePressEvent(QMouseEvent *e);
private:
QPushButton *m_button;
......
......@@ -25,6 +25,7 @@
#include "tageditor.h"
#include "collectionlist.h"
#include "playermanager.h"
#include "nowplaying.h"
using namespace ActionCollection;
......@@ -117,14 +118,14 @@ void PlaylistSplitter::setupLayout()
connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()),
m_editor, SLOT(slotUpdateCollection()));
m_nowPlaying = new NowPlaying(boxSplitter);
NowPlaying *nowPlaying = new NowPlaying(boxSplitter);
boxSplitter->moveToFirst(m_playlistBox);
connect(PlayerManager::instance(), SIGNAL(signalPlay()), m_nowPlaying, SLOT(slotRefresh()));
connect(PlayerManager::instance(), SIGNAL(signalStop()), m_nowPlaying, SLOT(slotClear()));
connect(PlayerManager::instance(), SIGNAL(signalCoverChanged()), m_nowPlaying, SLOT(slotRefresh()));
connect(PlayerManager::instance(), SIGNAL(signalPlay()), nowPlaying, SLOT(slotRefresh()));
connect(PlayerManager::instance(), SIGNAL(signalStop()), nowPlaying, SLOT(slotClear()));
connect(PlayerManager::instance(), SIGNAL(signalCoverChanged()), nowPlaying, SLOT(slotRefresh()));
boxSplitter->setResizeMode(m_nowPlaying, QSplitter::KeepSize);
boxSplitter->setResizeMode(nowPlaying, QSplitter::KeepSize);
// Create the search widget -- this must be done after the CollectionList is created.
......@@ -186,7 +187,7 @@ void PlaylistSplitter::slotPlaylistChanged(QWidget *w)
Playlist *p = dynamic_cast<Playlist *>(w);
if(p)
m_searchWidget->setSearch(p->search());
m_searchWidget->setSearch(p->search());
}
#include "playlistsplitter.moc"
......@@ -21,7 +21,6 @@
#include <qwidgetstack.h>
#include "playlistbox.h"
#include "nowplaying.h"
class KActionMenu;
class KDirWatch;
......@@ -81,7 +80,6 @@ private:
SearchWidget *m_searchWidget;
QWidgetStack *m_playlistStack;
TagEditor *m_editor;
NowPlaying *m_nowPlaying;
};
#endif
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