#include <QObject>
#include <QStringList>
-#define ADD_FILTER_MEDIA( string ) \
- string += qtr( "Media Files" ); \
- string += " ( "; \
- string += EXTENSIONS_MEDIA; \
- string += ");;";
-#define ADD_FILTER_VIDEO( string ) \
- string += qtr( "Video Files" ); \
- string += " ( "; \
- string += EXTENSIONS_VIDEO; \
- string += ");;";
-#define ADD_FILTER_AUDIO( string ) \
- string += qtr( "Audio Files" ); \
- string += " ( "; \
- string += EXTENSIONS_AUDIO; \
- string += ");;";
-#define ADD_FILTER_PLAYLIST( string ) \
- string += qtr( "Playlist Files" ); \
- string += " ( "; \
- string += EXTENSIONS_PLAYLIST; \
- string += ");;";
-#define ADD_FILTER_SUBTITLE( string ) \
- string += qtr( "Subtitles Files" );\
- string += " ( "; \
- string += EXTENSIONS_SUBTITLE; \
- string += ");;";
-#define ADD_FILTER_ALL( string ) \
- string += qtr( "All Files" ); \
- string += " (*)";
+#define TITLE_EXTENSIONS_MEDIA qtr( "Media Files" )
+#define TITLE_EXTENSIONS_VIDEO qtr( "Video Files" )
+#define TITLE_EXTENSIONS_AUDIO qtr( "Audio Files" )
+#define TITLE_EXTENSIONS_PLAYLIST qtr( "Playlist Files" )
+#define TITLE_EXTENSIONS_SUBTITLE qtr( "Subtitle Files" )
+#define TITLE_EXTENSIONS_ALL qtr( "All Files" )
+#define EXTENSIONS_ALL "*"
+#define ADD_EXT_FILTER( string, type ) \
+ string = string + QString("%1 ( %2 );;") \
+ .arg( TITLE_##type ) \
+ .arg( QString( type ) );
enum {
EXT_FILTER_MEDIA = 0x01,
EXT_FILTER_SUBTITLE = 0x10,
};
-enum {
- DialogEvent_Type = QEvent::User + DialogEventType + 1,
- //PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
- //PLDockEvent_Type = QEvent::User + DialogEventType + 3;
- SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4,
-};
-
class QEvent;
class QSignalMapper;
-class QVLCMenu;
+class VLCMenuBar;
class DialogsProvider : public QObject
{
- Q_OBJECT;
- friend class QVLCMenu;
+ Q_OBJECT
+ friend class VLCMenuBar;
public:
static DialogsProvider *getInstance()
delete instance;
instance = NULL;
}
- static bool isAlive()
- {
- return ( instance != NULL );
- }
QStringList showSimpleOpen( const QString& help = QString(),
int filters = EXT_FILTER_MEDIA |
EXT_FILTER_PLAYLIST,
const QString& path = QString() );
bool isDying() { return b_isDying; }
+ static QString getDirectoryDialog( intf_thread_t *p_intf);
+
protected:
QSignalMapper *menusMapper;
QSignalMapper *menusUpdateMapper;
static DialogsProvider *instance;
intf_thread_t *p_intf;
+
+ QMenu* popupMenu;
+ QMenu* videoPopupMenu;
+ QMenu* audioPopupMenu;
+ QMenu* miscPopupMenu;
+
+ QWidget* root;
bool b_isDying;
void openDialog( int );
void addFromSimple( bool, bool );
+ void saveAPlaylist(playlist_t *p_playlist, playlist_item_t *p_node);
public slots:
- void playMRL( const QString & );
-
void playlistDialog();
void bookmarksDialog();
void mediaInfoDialog();
void extendedDialog();
void synchroDialog();
void messagesDialog();
+ void sendKey( int key );
#ifdef ENABLE_VLM
void vlmDialog();
#endif
void podcastConfigureDialog();
void toolbarDialog();
void pluginDialog();
+ void epgDialog();
+ void setPopupMenu();
+ void destroyPopupMenu();
void openFileGenericDialog( intf_dialog_args_t * );
void simpleOpenDialog();
- void simplePLAppendDialog();
- void simpleMLAppendDialog();
void openDialog();
void openDiscDialog();
void PLOpenDir();
void PLAppendDir();
- void MLAppendDir();
void streamingDialog( QWidget *parent, const QString& mrl, bool b_stream = true,
QStringList options = QStringList("") );
void openAndTranscodingDialogs();
void openAPlaylist();
- void saveAPlaylist();
+ void savePlayingToPlaylist();
+ void saveRecentsToPlaylist();
void loadSubtitlesFile();
class DialogEvent : public QEvent
{
public:
+ static const QEvent::Type DialogEvent_Type;
DialogEvent( int _i_dialog, int _i_arg, intf_dialog_args_t *_p_arg ) :
- QEvent( (QEvent::Type)(DialogEvent_Type) )
+ QEvent( DialogEvent_Type )
{
i_dialog = _i_dialog;
i_arg = _i_arg;
p_arg = _p_arg;
- };
- virtual ~DialogEvent() { };
+ }
int i_arg, i_dialog;
intf_dialog_args_t *p_arg;