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"
21 #include <khbox.h> //baseclass for DynamicBox
22 #include <kxmlguiwindow.h>
23 #include <kxmlguiclient.h> //baseclass (for XMLGUI)
35 * @short The MainWindow widget class.
37 * This is the main window widget (the Playlist not Player).
39 class AMAROK_EXPORT MainWindow
: public KXmlGuiWindow
49 //allows us to switch browsers from within other browsers etc
50 void showBrowser( const QString
& name
);
51 void addBrowser( const QString
&name
, QWidget
*widget
, const QString
&text
, const QString
&icon
);
53 //takes into account minimized, multiple desktops, etc.
54 bool isReallyShown() const;
56 virtual bool eventFilter( QObject
*, QEvent
* );
58 //instance is declared in KXMLGUI
59 static MainWindow
*self() { return s_instance
; }
63 SideBar
*sideBar() const { return m_browsers
; }
67 void mbAvailabilityChanged( bool isAvailable
);
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 QWidget
*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