summaryrefslogtreecommitdiffstats
path: root/juk/playlistsplitter.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /juk/playlistsplitter.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/playlistsplitter.h')
-rw-r--r--juk/playlistsplitter.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/juk/playlistsplitter.h b/juk/playlistsplitter.h
new file mode 100644
index 00000000..0734ee05
--- /dev/null
+++ b/juk/playlistsplitter.h
@@ -0,0 +1,88 @@
+/***************************************************************************
+ begin : Fri Sep 13 2002
+ copyright : (C) 2002 - 2004 by Scott Wheeler
+ email : wheeler@kde.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PLAYLISTSPLITTER_H
+#define PLAYLISTSPLITTER_H
+
+#include <kfiledialog.h>
+
+#include <qwidgetstack.h>
+
+#include "playlistbox.h"
+
+class KActionMenu;
+class PlaylistItem;
+class SearchWidget;
+class HistoryPlaylist;
+class PlaylistInterface;
+class TagEditor;
+
+/**
+ * This is the main layout class of JuK. It should contain a PlaylistBox and
+ * a QWidgetStack of the Playlists.
+ *
+ * This class serves as a "mediator" (see "Design Patterns") between the JuK
+ * class and the playlist classes. Thus all access to the playlist classes from
+ * non-Playlist related classes should be through the public API of this class.
+ */
+
+class PlaylistSplitter : public QSplitter
+{
+ Q_OBJECT
+
+public:
+ PlaylistSplitter(QWidget *parent, const char *name = 0);
+ virtual ~PlaylistSplitter();
+
+ PlaylistInterface *playlist() const { return m_playlistBox; }
+
+ virtual bool eventFilter(QObject *watched, QEvent *event);
+
+public slots:
+ virtual void setFocus();
+ virtual void slotFocusCurrentPlaylist();
+
+private:
+
+ /**
+ * This returns a pointer to the first item in the playlist on the top
+ * of the QWidgetStack of playlists.
+ */
+ Playlist *visiblePlaylist() const;
+
+ void setupActions();
+ void setupLayout();
+ void readConfig();
+ void saveConfig();
+
+private slots:
+
+ /**
+ * Updates the visible search results based on the result of the search
+ * associated with the currently visible playlist.
+ */
+ void slotShowSearchResults();
+ void slotPlaylistSelectionChanged();
+ void slotPlaylistChanged(QWidget *w);
+
+private:
+ Playlist *m_newVisible;
+ PlaylistBox *m_playlistBox;
+ SearchWidget *m_searchWidget;
+ QWidgetStack *m_playlistStack;
+ TagEditor *m_editor;
+};
+
+#endif