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$
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 #include <QLabel>
00038 
00039 #include <limits.h>
00040 
00041 #define setSpinBounds( spinbox ) {               \
00042     spinbox->setRange( 0, INT_MAX );             \
00043     spinbox->setAccelerated( true ) ;            \
00044     spinbox->setAlignment( Qt::AlignRight );     \
00045     spinbox->setSpecialValueText(""); }
00046 
00047 class QTreeWidget;
00048 class QTreeWidgetItem;
00049 class QTreeView;
00050 class QSpinBox;
00051 class QLineEdit;
00052 
00053 class MetaPanel: public QWidget
00054 {
00055     Q_OBJECT;
00056 public:
00057     MetaPanel( QWidget *, intf_thread_t * );
00058     virtual ~MetaPanel();
00059     void saveMeta();
00060 
00061     bool isInEditMode();
00062     void setEditMode( bool );
00063 
00064 private:
00065     input_item_t *p_input;
00066     intf_thread_t *p_intf;
00067     bool b_inEditMode;
00068 
00069     QLineEdit *title_text;
00070     QLineEdit *artist_text;
00071     QLineEdit *genre_text;
00072     QLineEdit *copyright_text;
00073     QLineEdit *collection_text;
00074     QLineEdit *seqnum_text;
00075     QLineEdit *description_text;
00076 //    QSpinBox *rating_text;
00077     QLineEdit *date_text;
00078 //    QLineEdit *setting_text;
00079     QLineEdit *language_text;
00080     QLineEdit *nowplaying_text;
00081     QLineEdit *publisher_text;
00082 //    QLineEdit *encodedby_text;
00083     QLabel *art_cover;
00084 
00085 public slots:
00086     void update( input_item_t * );
00087     void clear();
00088 
00089 private slots:
00090     void enterEditMode();
00091 
00092 signals:
00093     void uriSet( QString );
00094     void editing();
00095 };
00096 
00097 class ExtraMetaPanel: public QWidget
00098 {
00099     Q_OBJECT;
00100 public:
00101     ExtraMetaPanel( QWidget *, intf_thread_t * );
00102     virtual  ~ExtraMetaPanel() {};
00103 private:
00104     intf_thread_t *p_intf;
00105     QTreeWidget *extraMetaTree;
00106 public slots:
00107     void update( input_item_t * );
00108     void clear();
00109 };
00110 
00111 class InputStatsPanel: public QWidget
00112 {
00113     Q_OBJECT;
00114 public:
00115     InputStatsPanel( QWidget *, intf_thread_t * );
00116     virtual ~InputStatsPanel();
00117 private:
00118     intf_thread_t *p_intf;
00119 
00120     QTreeWidget *StatsTree;
00121     QTreeWidgetItem *input;
00122     QTreeWidgetItem *read_media_stat;
00123     QTreeWidgetItem *input_bitrate_stat;
00124     QTreeWidgetItem *demuxed_stat;
00125     QTreeWidgetItem *stream_bitrate_stat;
00126 
00127     QTreeWidgetItem *video;
00128     QTreeWidgetItem *vdecoded_stat;
00129     QTreeWidgetItem *vdisplayed_stat;
00130     QTreeWidgetItem *vlost_frames_stat;
00131     QTreeWidgetItem *vfps_stat;
00132 
00133     QTreeWidgetItem *streaming;
00134     QTreeWidgetItem *send_stat;
00135     QTreeWidgetItem *send_bytes_stat;
00136     QTreeWidgetItem *send_bitrate_stat;
00137 
00138     QTreeWidgetItem *audio;
00139     QTreeWidgetItem *adecoded_stat;
00140     QTreeWidgetItem *aplayed_stat;
00141     QTreeWidgetItem *alost_stat;
00142 
00143 public slots:
00144     void update( input_item_t * );
00145     void clear();
00146 };
00147 
00148 class InfoPanel: public QWidget
00149 {
00150     Q_OBJECT;
00151 public:
00152     InfoPanel( QWidget *, intf_thread_t * );
00153     virtual ~InfoPanel();
00154 private:
00155     intf_thread_t *p_intf;
00156     QTreeWidget *InfoTree;
00157 public slots:
00158     void update( input_item_t * );
00159     void clear();
00160 };
00161 class ArtCover : public QLabel
00162 {
00163     Q_OBJECT
00164     void mouseDoubleClickEvent( QMouseEvent *event )
00165     {
00166         fprintf(stderr, "**************************" );
00167     }
00168 };
00169 
00170 #endif

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1