1 /*****************************************************************************
2 * vlm.hpp : VLM Management
3 ****************************************************************************
4 * Copyright ( C ) 2006 the VideoLAN team
5 * $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $
7 * Authors: Jean-François Massol <jf.massol@gmail.com>
8 * Jean-Baptiste Kempf <jb@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * ( at your option ) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef _VLM_DIALOG_H_
26 #define _VLM_DIALOG_H_
31 #include "util/qvlcframe.hpp"
54 class VLMDialog : public QVLCFrame
58 static VLMDialog * getInstance( intf_thread_t *p_intf )
61 instance = new VLMDialog( p_intf );
67 VLMDialog( intf_thread_t * );
68 static VLMDialog *instance;
71 QList<VLMAWidget *> vlmItems;
74 QVBoxLayout *vlmItemLayout;
75 QWidget *vlmItemWidget;
78 QDateTimeEdit *time, *date, *repeatTime;
79 QSpinBox *scherepeatnumber, *repeatDays;
80 bool isNameGenuine( QString );
82 void removeVLMItem( VLMAWidget * );
83 void startModifyVLMItem( VLMAWidget * );
87 void saveModifications();
88 void showScheduleWidget( int );
89 void selectVLMItem( int );
92 class VLMAWidget : public QGroupBox
95 friend class VLMDialog;
97 VLMAWidget( QString name, QString input, QString output, bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast );
106 virtual void enterEvent( QEvent * );
107 QGridLayout *objLayout;
109 virtual void modify();
113 class VLMBroadcast : public VLMAWidget
117 VLMBroadcast( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
122 void togglePlayPause();
126 class VLMVod : public VLMAWidget
129 VLMVod( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
134 class VLMSchedule : public VLMAWidget
137 VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent );