]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/open.hpp
Qt4 - Use same type of button in order to not kill the eyes, if you run Plastique...
[vlc] / modules / gui / qt4 / dialogs / open.hpp
1 /*****************************************************************************
2  * open.hpp : advanced open dialog
3  ****************************************************************************
4  * Copyright (C) 2006-2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
8  *
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.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  ******************************************************************************/
23
24 #ifndef _OPEN_DIALOG_H_
25 #define _OPEN_DIALOG_H_
26
27 #include <vlc/vlc.h>
28
29 #include "util/qvlcframe.hpp"
30 #include "dialogs_provider.hpp"
31 #include "ui/open.h"
32 #include "components/open_panels.hpp"
33
34 class QString;
35 class QToolButton;
36 class QTabWidget;
37
38 class OpenDialog : public QVLCDialog
39 {
40     Q_OBJECT;
41 public:
42     static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
43                                      int _action_flag = 0, bool modal = false  );
44
45     static void killInstance()
46     {
47         if( instance ) delete instance;
48         instance = NULL;
49     }
50     virtual ~OpenDialog();
51
52     void showTab( int );
53     QString getMRL(){ return mrl; }
54
55 public slots:
56     void selectSlots();
57     void play();
58     void stream( bool b_transode_only = false );
59     void enqueue();
60     void transcode();
61
62 private:
63     OpenDialog( QWidget *parent, intf_thread_t *, bool modal,
64                 int _action_flag = 0 );
65
66     static OpenDialog *instance;
67     input_thread_t *p_input;
68
69     QString mrl;
70     QString mainMRL;
71     QString storedMethod;
72
73     Ui::Open ui;
74     FileOpenPanel *fileOpenPanel;
75     NetOpenPanel *netOpenPanel;
76     DiscOpenPanel *discOpenPanel;
77     CaptureOpenPanel *captureOpenPanel;
78
79     int i_action_flag;
80     QStringList SeparateEntries( QString );
81
82     QToolButton *cancelButton, *selectButton;
83     QToolButton *playButton;
84
85     void finish( bool );
86
87 private slots:
88     void setMenuAction();
89     void cancel();
90     void close();
91     void toggleAdvancedPanel();
92     void updateMRL( QString );
93     void updateMRL();
94     void newCachingMethod( QString );
95     void signalCurrent();
96 };
97
98 #endif