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
; }
65 void deleteBrowsers();
71 void slotShrinkBrowsers( int index
) const;
72 void savePlaylist() const;
73 void slotBurnPlaylist() const;
74 void slotShowCoverManager() const;
76 void slotAddLocation( bool directPlay
= false );
78 void playLastfmPersonal();
79 void addLastfmPersonal();
80 void playLastfmNeighbor();
81 void addLastfmNeighbor();
82 void playLastfmCustom();
83 void addLastfmCustom();
84 void playLastfmGlobaltag();
85 void addLastfmGlobaltag();
87 void showQueueManager();
88 void showScriptSelector();
89 void showStatistics();
90 void toolsMenuAboutToShow();
91 void slotToggleFocus();
92 void slotToggleToolbar();
93 // void slotEditFilter();
94 void slotSetFilter( const QString
&filter
);
97 virtual void closeEvent( QCloseEvent
* );
98 virtual void showEvent( QShowEvent
* );
99 virtual QSize
sizeHint() const;
102 enum MenuId
{ ID_SHOW_TOOLBAR
= 2000, ID_SHOW_PLAYERWINDOW
};
106 KMenu
*m_settingsMenu
;
108 QStringList m_browserNames
;
111 SearchWidget
*m_searchWidget
;
112 MainToolbar
*m_controlBar
;
113 QTimer
*m_timer
; //search filter timer
114 QStringList m_lastfmTags
;
115 MediaBrowser
*m_currMediaBrowser
;
116 QSplitter
*m_splitter
;
118 void createActions();
122 static MainWindow
*s_instance
;
126 #endif //AMAROK_PLAYLISTWINDOW_H