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