1 /* qv4l2: a control panel controlling v4l2 devices. 2 * 3 * Copyright (C) 2012 Hans Verkuil <hverkuil@xs4all.nl> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Vbi Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Vbi Public License for more details. 14 * 15 * You should have received a copy of the GNU Vbi Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 21 #ifndef VBI_TAB_H 22 #define VBI_TAB_H 23 24 #include "qv4l2.h" 25 26 class QTableWidget; 27 28 class VbiTab: public QGridLayout 29 { 30 Q_OBJECT 31 32 public: 33 VbiTab(QWidget *parent = 0); ~VbiTab()34 virtual ~VbiTab() {} 35 36 void rawFormat(const v4l2_vbi_format &fmt); 37 void slicedFormat(const v4l2_sliced_vbi_format &fmt); 38 void slicedData(const v4l2_sliced_vbi_data *data, unsigned elems); 39 40 private: info(const QString & info)41 void info(const QString &info) 42 { 43 g_mw->info(info); 44 } error(const QString & error)45 virtual void error(const QString &error) 46 { 47 g_mw->error(error); 48 } 49 void tableFormat(); 50 51 QTableWidget *m_tableF1; 52 QTableWidget *m_tableF2; 53 unsigned m_startF1, m_startF2; 54 unsigned m_countF1, m_countF2; 55 unsigned m_offsetF2; 56 }; 57 58 #endif 59