]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/open.hpp
Qt4 - Fix the "sound slider moves at first time, even If I didn't click it" bug.
[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 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include <vlc/vlc.h>
32
33 #include "util/qvlcframe.hpp"
34 #include "dialogs_provider.hpp"
35 #include "ui/open.h"
36 #include "components/open_panels.hpp"
37
38 class QString;
39 class QToolButton;
40 class QTabWidget;
41
42 class OpenDialog : public QVLCDialog
43 {
44     Q_OBJECT;
45 public:
46     static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
47                                      int _action_flag = 0, bool modal = false  );
48
49     static void killInstance()
50     {
51         if( instance ) delete instance;
52         instance = NULL;
53     }
54     virtual ~OpenDialog();
55
56     void showTab( int );
57     QString getMRL(){ return mrl; }
58
59 public slots:
60     void selectSlots();
61     void play();
62     void stream( bool b_transode_only = false );
63     void enqueue();
64     void transcode();
65
66 private:
67     OpenDialog( QWidget *parent, intf_thread_t *, bool modal,
68                 int _action_flag = 0 );
69
70     static OpenDialog *instance;
71     input_thread_t *p_input;
72
73     QString mrl;
74     QString mainMRL;
75     QString storedMethod;
76
77     Ui::Open ui;
78     FileOpenPanel *fileOpenPanel;
79     NetOpenPanel *netOpenPanel;
80     DiscOpenPanel *discOpenPanel;
81     CaptureOpenPanel *captureOpenPanel;
82
83     int i_action_flag;
84     QStringList SeparateEntries( QString );
85
86     QToolButton *cancelButton, *selectButton;
87     QToolButton *playButton;
88
89     void finish( bool );
90
91 private slots:
92     void setMenuAction();
93     void cancel();
94     void close();
95     void toggleAdvancedPanel();
96     void updateMRL( QString );
97     void updateMRL();
98     void newCachingMethod( QString );
99     void signalCurrent();
100 };
101
102 #endif