info_panels.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * infopanels.hpp : Panels for the information dialogs
00003  ****************************************************************************
00004  * Copyright (C) 2006-2007 the VideoLAN team
00005  * $Id: ec58f29cfb5acdd8c1c87bb1bd9342f230078fcb $
00006  *
00007  * Authors: Clément Stenac <zorglub@videolan.org>
00008  *          Jean-Baptiste Kempf <jb@videolan.org>
00009  *          Ilkka Ollakka <ileoo@videolan.org>
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00024  *****************************************************************************/
00025 
00026 #ifndef _INFOPANELS_H_
00027 #define _INFOPANELS_H_
00028 
00029 #ifdef HAVE_CONFIG_H
00030 # include "config.h"
00031 #endif
00032 
00033 #include <vlc_common.h>
00034 #include <vlc_meta.h>
00035 
00036 #include <QWidget>
00037 
00038 #include <limits.h>
00039 
00040 #define setSpinBounds( spinbox ) {               \
00041     spinbox->setRange( 0, INT_MAX );             \
00042     spinbox->setAccelerated( true ) ;            \
00043     spinbox->setAlignment( Qt::AlignRight );     \
00044     spinbox->setSpecialValueText(""); }
00045 
00046 class QTreeWidget;
00047 class QTreeWidgetItem;
00048 class QTreeView;
00049 class QSpinBox;
00050 class QLineEdit;
00051 class CoverArtLabel;
00052 
00053 class MetaPanel: public QWidget
00054 {
00055     Q_OBJECT
00056 public:
00057     MetaPanel( QWidget *, struct intf_thread_t * );
00058     void saveMeta();
00059 
00060     bool isInEditMode();
00061     void setEditMode( bool );
00062 
00063 private:
00064     input_item_t *p_input;
00065     struct intf_thread_t *p_intf;
00066     bool b_inEditMode;
00067 
00068     QLineEdit *title_text;
00069     QLineEdit *artist_text;
00070     QLineEdit *genre_text;
00071     QLineEdit *copyright_text;
00072     QLineEdit *collection_text;
00073     QLineEdit *seqnum_text;
00074     QLineEdit *description_text;
00075 //    QSpinBox *rating_text;
00076     QLineEdit *date_text;
00077 //    QLineEdit *setting_text;
00078     QLineEdit *language_text;
00079     QLineEdit *nowplaying_text;
00080     QLineEdit *publisher_text;
00081 //    QLineEdit *encodedby_text;
00082     CoverArtLabel *art_cover;
00083 
00084 public slots:
00085     void update( input_item_t * );
00086     void clear();
00087 
00088 private slots:
00089     void enterEditMode();
00090 
00091 signals:
00092     void uriSet( const QString& );
00093     void editing();
00094 };
00095 
00096 class ExtraMetaPanel: public QWidget
00097 {
00098     Q_OBJECT
00099 public:
00100     ExtraMetaPanel( QWidget *, struct intf_thread_t * );
00101 private:
00102     struct intf_thread_t *p_intf;
00103     QTreeWidget *extraMetaTree;
00104 public slots:
00105     void update( input_item_t * );
00106     void clear();
00107 };
00108 
00109 class InputStatsPanel: public QWidget
00110 {
00111     Q_OBJECT
00112 public:
00113     InputStatsPanel( QWidget *, struct intf_thread_t * );
00114 private:
00115     struct intf_thread_t *p_intf;
00116 
00117     QTreeWidget *StatsTree;
00118     QTreeWidgetItem *input;
00119     QTreeWidgetItem *read_media_stat;
00120     QTreeWidgetItem *input_bitrate_stat;
00121     QTreeWidgetItem *demuxed_stat;
00122     QTreeWidgetItem *stream_bitrate_stat;
00123     QTreeWidgetItem *corrupted_stat;
00124     QTreeWidgetItem *discontinuity_stat;
00125 
00126     QTreeWidgetItem *video;
00127     QTreeWidgetItem *vdecoded_stat;
00128     QTreeWidgetItem *vdisplayed_stat;
00129     QTreeWidgetItem *vlost_frames_stat;
00130     QTreeWidgetItem *vfps_stat;
00131 
00132     QTreeWidgetItem *streaming;
00133     QTreeWidgetItem *send_stat;
00134     QTreeWidgetItem *send_bytes_stat;
00135     QTreeWidgetItem *send_bitrate_stat;
00136 
00137     QTreeWidgetItem *audio;
00138     QTreeWidgetItem *adecoded_stat;
00139     QTreeWidgetItem *aplayed_stat;
00140     QTreeWidgetItem *alost_stat;
00141 
00142 public slots:
00143     void update( input_item_t * );
00144     void clear();
00145 };
00146 
00147 class InfoPanel: public QWidget
00148 {
00149     Q_OBJECT
00150 public:
00151     InfoPanel( QWidget *, struct intf_thread_t * );
00152 private:
00153     struct intf_thread_t *p_intf;
00154     QTreeWidget *InfoTree;
00155 public slots:
00156     void update( input_item_t * );
00157     void clear();
00158 };
00159 
00160 #endif

Generated on Tue May 25 08:04:57 2010 for VLC by  doxygen 1.5.6