]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/infopanels.hpp
Qt4 - Open Dialog. Use #defines for tab naming to avoid miscomprehensions. Cosmectics.
[vlc] / modules / gui / qt4 / components / infopanels.hpp
index 4f3dca8e14a7d363f84cc52d01592bf47bdfae2f..952b7060c9e2d993087be802b47b07bac0898ac0 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
- *
+ *          Jean-Baptiste Kempf <jb@videolan.org>
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
 
 #ifndef _INFOPANELS_H_
 #define _INFOPANELS_H_
+
 #include <vlc/vlc.h>
+#include <vlc_meta.h>
+
 #include <QWidget>
-#include "ui/input_stats.h"
+#include <QTabWidget>
+#include <QLabel>
+
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class MetaPanel: public QWidget
+{
+    Q_OBJECT;
+public:
+    MetaPanel( QWidget *, intf_thread_t * );
+    virtual ~MetaPanel();
+private:
+    intf_thread_t *p_intf;
+    QLabel *uri_text;
+    QLabel *name_text;
+    QLabel *artist_text;
+    QLabel *genre_text;
+    QLabel *copyright_text;
+    QLabel *collection_text;
+    QLabel *seqnum_text;
+    QLabel *description_text;
+    QLabel *rating_text;
+    QLabel *date_text;
+    QLabel *setting_text;
+    QLabel *language_text;
+    QLabel *nowplaying_text;
+    QLabel *publisher_text;
+
+public slots:
+    void update( input_item_t * );
+    void clear();
+};
+
 
 class InputStatsPanel: public QWidget
 {
@@ -35,11 +71,63 @@ public:
     virtual ~InputStatsPanel();
 private:
     intf_thread_t *p_intf;
-    Ui::InputStats ui;
 
+    QTreeWidget *StatsTree;
+    QTreeWidgetItem *input;
+    QTreeWidgetItem *read_media_stat;
+    QTreeWidgetItem *input_bitrate_stat;
+    QTreeWidgetItem *demuxed_stat;
+    QTreeWidgetItem *stream_bitrate_stat;
+
+    QTreeWidgetItem *video;
+    QTreeWidgetItem *vdecoded_stat;
+    QTreeWidgetItem *vdisplayed_stat;
+    QTreeWidgetItem *vlost_frames_stat;
+
+    QTreeWidgetItem *streaming;
+    QTreeWidgetItem *send_stat;
+    QTreeWidgetItem *send_bytes_stat;
+    QTreeWidgetItem *send_bitrate_stat;
+
+    QTreeWidgetItem *audio;
+    QTreeWidgetItem *adecoded_stat;
+    QTreeWidgetItem *aplayed_stat;
+    QTreeWidgetItem *alost_stat;
+
+public slots:
+    void update( input_item_t * );
+    void clear();
+};
+
+class InfoPanel: public QWidget
+{
+    Q_OBJECT;
+public:
+    InfoPanel( QWidget *, intf_thread_t * );
+    virtual ~InfoPanel();
+private:
+    intf_thread_t *p_intf;
+    QTreeWidget *InfoTree;
 public slots:
-    void Update( input_item_t * );
+    void update( input_item_t * );
+    void clear();
 };
 
+class InfoTab: public QTabWidget
+{
+    Q_OBJECT;
+public:
+    InfoTab( QWidget *, intf_thread_t *, bool );
+    virtual ~InfoTab();
+    void update( input_item_t *, bool, bool );
+    void clear();
+private:
+    bool stats;
+    intf_thread_t *p_intf;
+    InputStatsPanel *ISP;
+    MetaPanel *MP;
+    InfoPanel *IP;
+    int i_runs;
+};
 
 #endif