info_panels.hpp
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:4k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*****************************************************************************
  2.  * infopanels.hpp : Panels for the information dialogs
  3.  ****************************************************************************
  4.  * Copyright (C) 2006-2007 the VideoLAN team
  5.  * $Id: f5d8de8ede673319468ef321d5f9977779ce3b72 $
  6.  *
  7.  * Authors: Clément Stenac <zorglub@videolan.org>
  8.  *          Jean-Baptiste Kempf <jb@videolan.org>
  9.  *          Ilkka Ollakka <ileoo@videolan.org>
  10.  *
  11.  * This program is free software; you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation; either version 2 of the License, or
  14.  * (at your option) any later version.
  15.  *
  16.  * This program is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  *
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  24.  *****************************************************************************/
  25. #ifndef _INFOPANELS_H_
  26. #define _INFOPANELS_H_
  27. #ifdef HAVE_CONFIG_H
  28. # include "config.h"
  29. #endif
  30. #include <vlc_common.h>
  31. #include <vlc_meta.h>
  32. #include <QWidget>
  33. #include <limits.h>
  34. #define setSpinBounds( spinbox ) {               
  35.     spinbox->setRange( 0, INT_MAX );             
  36.     spinbox->setAccelerated( true ) ;            
  37.     spinbox->setAlignment( Qt::AlignRight );     
  38.     spinbox->setSpecialValueText(""); }
  39. class QTreeWidget;
  40. class QTreeWidgetItem;
  41. class QTreeView;
  42. class QSpinBox;
  43. class QLineEdit;
  44. class CoverArtLabel;
  45. class MetaPanel: public QWidget
  46. {
  47.     Q_OBJECT;
  48. public:
  49.     MetaPanel( QWidget *, intf_thread_t * );
  50.     void saveMeta();
  51.     bool isInEditMode();
  52.     void setEditMode( bool );
  53. private:
  54.     input_item_t *p_input;
  55.     intf_thread_t *p_intf;
  56.     bool b_inEditMode;
  57.     QLineEdit *title_text;
  58.     QLineEdit *artist_text;
  59.     QLineEdit *genre_text;
  60.     QLineEdit *copyright_text;
  61.     QLineEdit *collection_text;
  62.     QLineEdit *seqnum_text;
  63.     QLineEdit *description_text;
  64. //    QSpinBox *rating_text;
  65.     QLineEdit *date_text;
  66. //    QLineEdit *setting_text;
  67.     QLineEdit *language_text;
  68.     QLineEdit *nowplaying_text;
  69.     QLineEdit *publisher_text;
  70. //    QLineEdit *encodedby_text;
  71.     CoverArtLabel *art_cover;
  72. public slots:
  73.     void update( input_item_t * );
  74.     void clear();
  75. private slots:
  76.     void enterEditMode();
  77. signals:
  78.     void uriSet( const QString& );
  79.     void editing();
  80. };
  81. class ExtraMetaPanel: public QWidget
  82. {
  83.     Q_OBJECT;
  84. public:
  85.     ExtraMetaPanel( QWidget *, intf_thread_t * );
  86. private:
  87.     intf_thread_t *p_intf;
  88.     QTreeWidget *extraMetaTree;
  89. public slots:
  90.     void update( input_item_t * );
  91.     void clear();
  92. };
  93. class InputStatsPanel: public QWidget
  94. {
  95.     Q_OBJECT;
  96. public:
  97.     InputStatsPanel( QWidget *, intf_thread_t * );
  98. private:
  99.     intf_thread_t *p_intf;
  100.     QTreeWidget *StatsTree;
  101.     QTreeWidgetItem *input;
  102.     QTreeWidgetItem *read_media_stat;
  103.     QTreeWidgetItem *input_bitrate_stat;
  104.     QTreeWidgetItem *demuxed_stat;
  105.     QTreeWidgetItem *stream_bitrate_stat;
  106.     QTreeWidgetItem *corrupted_stat;
  107.     QTreeWidgetItem *discontinuity_stat;
  108.     QTreeWidgetItem *video;
  109.     QTreeWidgetItem *vdecoded_stat;
  110.     QTreeWidgetItem *vdisplayed_stat;
  111.     QTreeWidgetItem *vlost_frames_stat;
  112.     QTreeWidgetItem *vfps_stat;
  113.     QTreeWidgetItem *streaming;
  114.     QTreeWidgetItem *send_stat;
  115.     QTreeWidgetItem *send_bytes_stat;
  116.     QTreeWidgetItem *send_bitrate_stat;
  117.     QTreeWidgetItem *audio;
  118.     QTreeWidgetItem *adecoded_stat;
  119.     QTreeWidgetItem *aplayed_stat;
  120.     QTreeWidgetItem *alost_stat;
  121. public slots:
  122.     void update( input_item_t * );
  123.     void clear();
  124. };
  125. class InfoPanel: public QWidget
  126. {
  127.     Q_OBJECT;
  128. public:
  129.     InfoPanel( QWidget *, intf_thread_t * );
  130. private:
  131.     intf_thread_t *p_intf;
  132.     QTreeWidget *InfoTree;
  133. public slots:
  134.     void update( input_item_t * );
  135.     void clear();
  136. };
  137. #endif