1 /***************************************************************************
2 begin : Fre Nov 15 2002
3 copyright : (C) Mark Kretschmann <markey@web.de>
4 : (C) Max Howell <max.howell@methylblue.com>
5 ***************************************************************************/
7 /***************************************************************************
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. *
14 ***************************************************************************/
16 #ifndef AMAROK_PLAYLISTWINDOW_H
17 #define AMAROK_PLAYLISTWINDOW_H
19 #include "amarok_export.h"
20 #include "widgets/MainToolbar.h"
22 #include <khbox.h> //baseclass for DynamicBox
23 #include <kxmlguiwindow.h>
24 #include <kxmlguiclient.h> //baseclass (for XMLGUI)
36 * @short The MainWindow widget class.
38 * This is the main window widget (the Playlist not Player).
40 class AMAROK_EXPORT MainWindow
: public KXmlGuiWindow
50 //allows us to switch browsers from within other browsers etc
51 void showBrowser( const QString
& name
);
52 void addBrowser( const QString
&name
, QWidget
*widget
, const QString
&text
, const QString
&icon
);
54 //takes into account minimized, multiple desktops, etc.
55 bool isReallyShown() const;
57 virtual bool eventFilter( QObject
*, QEvent
* );
59 //instance is declared in KXMLGUI
60 static MainWindow
*self() { return s_instance
; }
64 SideBar
*sideBar() const { return m_browsers
; }
70 void slotShrinkBrowsers( int index
) const;
71 void savePlaylist() const;
72 void slotBurnPlaylist() const;
73 void slotShowCoverManager() const;
75 void slotAddLocation( bool directPlay
= false );
77 void playLastfmPersonal();
78 void addLastfmPersonal();
79 void playLastfmNeighbor();
80 void addLastfmNeighbor();
81 void playLastfmCustom();
82 void addLastfmCustom();
83 void playLastfmGlobaltag();
84 void addLastfmGlobaltag();
86 void showQueueManager();
87 void showScriptSelector();
88 void showStatistics();
89 void toolsMenuAboutToShow();
90 void slotToggleFocus();
91 void slotToggleToolbar();
92 // void slotEditFilter();
93 void slotSetFilter( const QString
&filter
);
96 virtual void closeEvent( QCloseEvent
* );
97 virtual void showEvent( QShowEvent
* );
98 virtual QSize
sizeHint() const;
101 enum MenuId
{ ID_SHOW_TOOLBAR
= 2000, ID_SHOW_PLAYERWINDOW
};
105 KMenu
*m_settingsMenu
;
107 QStringList m_browserNames
;
110 SearchWidget
*m_searchWidget
;
111 MainToolbar
*m_controlBar
;
112 QTimer
*m_timer
; //search filter timer
113 QStringList m_lastfmTags
;
114 MediaBrowser
*m_currMediaBrowser
;
115 QSplitter
*m_splitter
;
117 void createActions();
121 static MainWindow
*s_instance
;
125 #endif //AMAROK_PLAYLISTWINDOW_H