/*****************************************************************************
* dialogs_provider.hpp : Dialogs provider
****************************************************************************
- * Copyright (C) 2000-2005 the VideoLAN team
- * $Id: wxwidgets.cpp 15731 2006-05-25 14:43:53Z zorglub $
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
#include <QObject>
#include <QTimer>
#include <QApplication>
+
+#include "dialogs/interaction.hpp"
+
+#include <assert.h>
#include <vlc/vlc.h>
+#include <vlc_interface.h>
+
+#define ADD_FILTER_MEDIA( string ) \
+ string += _("Media Files"); \
+ string += " ( "; \
+ string += EXTENSIONS_MEDIA; \
+ string += ");;";
+#define ADD_FILTER_VIDEO( string ) \
+ string += _("Video Files"); \
+ string += " ( "; \
+ string += EXTENSIONS_VIDEO; \
+ string += ");;";
+#define ADD_FILTER_AUDIO( string ) \
+ string += _("Audio Files"); \
+ string += " ( "; \
+ string += EXTENSIONS_AUDIO; \
+ string += ");;";
+#define ADD_FILTER_PLAYLIST( string )\
+ string += _("Playlist Files"); \
+ string += " ( "; \
+ string += EXTENSIONS_PLAYLIST; \
+ string += ");;";
+#define ADD_FILTER_ALL( string ) \
+ string += _("All Files"); \
+ string += " (*.*)";
+
class QEvent;
+class QSignalMapper;
+class QVLCMenu;
class DialogsProvider : public QObject
{
Q_OBJECT;
public:
+ static DialogsProvider *getInstance()
+ {
+ assert( instance );
+ return instance;
+ }
static DialogsProvider *getInstance( intf_thread_t *p_intf )
{
if( !instance )
instance = new DialogsProvider( p_intf );
return instance;
}
+ static void killInstance()
+ {
+ if( instance ) delete instance;
+ instance=NULL;
+ }
virtual ~DialogsProvider();
- QTimer *idle_timer;
QTimer *fixed_timer;
+
+ QStringList showSimpleOpen( QString help = QString(), bool all = true,
+ bool video = true, bool audio = true,
+ bool subs = true, bool pls = true );
protected:
+ friend class QVLCMenu;
+ QSignalMapper *menusMapper;
+ QSignalMapper *menusUpdateMapper;
+ QSignalMapper *SDMapper;
void customEvent( QEvent *);
private:
DialogsProvider( intf_thread_t *);
intf_thread_t *p_intf;
static DialogsProvider *instance;
+ void addFromSimple( bool, bool );
public slots:
void playlistDialog();
- void streaminfoDialog();
+ void bookmarksDialog();
+ void mediaInfoDialog();
void prefsDialog();
+ void extendedDialog();
void messagesDialog();
- void openDialog( int );
+ void simplePLAppendDialog();
+ void simpleMLAppendDialog();
+ void simpleOpenDialog();
+ void openDialog();
+ void openDialog(int );
+ void openFileDialog();
+ void openNetDialog();
+ void openCaptureDialog();
+ void openDiscDialog();
+ void PLAppendDialog();
+ void MLAppendDialog();
void popupMenu( int );
+ void doInteraction( intf_dialog_args_t * );
+ void menuAction( QObject *);
+ void menuUpdateAction( QObject *);
+ void SDMenuAction( QString );
+ void streamingDialog();
+ void openPlaylist();
+ void savePlaylist();
+ void PLAppendDir();
+ void MLAppendDir();
+ void quit();
+ void switchToSkins();
+ void helpDialog();
+ void aboutDialog();
};
-
#endif