]> git.sesse.net Git - vlc/blob - modules/gui/qt/intf.h
Avoid \r\n problems between platforms
[vlc] / modules / gui / qt / intf.h
1 /*****************************************************************************
2  * intf.h: Qt interface
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id$
6  *
7  * Authors: Samuel Hocevar <sam@zoy.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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include <vlc/vlc.h>
28 #include <vlc/intf.h>
29
30 #include <qapplication.h>
31 #include <qmainwindow.h>
32 #include <qtoolbar.h>
33 #include <qtoolbutton.h>
34 #include <qwhatsthis.h>
35 #include <qpushbutton.h>
36 #include <qfiledialog.h>
37 #include <qslider.h>
38 #include <qlcdnumber.h>
39 #include <qmenubar.h>
40 #include <qstatusbar.h>
41 #include <qmessagebox.h>
42 #include <qlabel.h> 
43 #include <qtimer.h> 
44 #include <qiconset.h> 
45
46 #include <qvbox.h>
47 #include <qhbox.h>
48
49 /*****************************************************************************
50  * Local Qt slider class
51  *****************************************************************************/
52 class IntfSlider : public QSlider
53 {
54     Q_OBJECT
55
56 public:
57     IntfSlider( intf_thread_t *, QWidget * );  /* Constructor and destructor */
58     ~IntfSlider();
59
60     bool b_free;                                     /* Is the slider free ? */
61
62     int  oldvalue   ( void ) { return i_oldvalue; };
63     void setOldValue( int i_value ) { i_oldvalue = i_value; };
64
65 private slots:
66     void SlideStart ( void ) { b_free = FALSE; };
67     void SlideStop  ( void ) { b_free = TRUE; };
68
69 private:
70     intf_thread_t *p_intf;
71     int  i_oldvalue;
72 };
73
74 /*****************************************************************************
75  * Local Qt interface window class
76  *****************************************************************************/
77 class IntfWindow : public QMainWindow
78 {
79     Q_OBJECT
80
81 public:
82     IntfWindow( intf_thread_t * );
83     ~IntfWindow();
84
85 private slots:
86     void Manage ( void );
87
88     void FileOpen  ( void );
89     void FileQuit  ( void );
90
91     void PlaybackPlay  ( void );
92     void PlaybackPause ( void );
93     void PlaybackSlow  ( void );
94     void PlaybackFast  ( void );
95
96     void PlaylistPrev  ( void );
97     void PlaylistNext  ( void );
98
99     void DateDisplay  ( int );
100     void About ( void );
101
102     void Unimplemented( void ) { msg_Warn( p_intf, "unimplemented" ); };
103
104 private:
105     intf_thread_t *p_intf;
106
107     IntfSlider *p_slider;
108
109     QToolBar   *p_toolbar;
110     QPopupMenu *p_popup;
111     QLabel     *p_date;
112 };
113