/*****************************************************************************
* infopanels.hpp : Panels for the information dialogs
****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
* $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
#include <vlc_meta.h>
#include <QWidget>
-#include <QTabWidget>
-#include "ui/input_stats.h"
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#define setSpinBounds( spinbox ) { \
+ spinbox->setRange( 0, INT_MAX ); \
+ spinbox->setAccelerated( true ) ; \
+ spinbox->setAlignment( Qt::AlignRight ); \
+ spinbox->setSpecialValueText(""); }
class QTreeWidget;
class QTreeWidgetItem;
+class QTreeView;
+class QSpinBox;
+class QLineEdit;
+class QLabel;
-class InputStatsPanel: public QWidget
+class MetaPanel: public QWidget
{
Q_OBJECT;
public:
- InputStatsPanel( QWidget *, intf_thread_t * );
- virtual ~InputStatsPanel();
+ MetaPanel( QWidget *, intf_thread_t * );
+ virtual ~MetaPanel();
+ void saveMeta();
+ void setInput( input_item_t * );
+
+ bool isInEditMode();
+ void setEditMode( bool );
+
private:
+ input_item_t *p_input;
intf_thread_t *p_intf;
- Ui::InputStats ui;
+ bool b_inEditMode;
+
+ QLineEdit *uri_text;
+ QLineEdit *title_text;
+ QLineEdit *artist_text;
+ QLineEdit *genre_text;
+ QLineEdit *copyright_text;
+ QLineEdit *collection_text;
+ QLineEdit *seqnum_text;
+ QLineEdit *description_text;
+ QSpinBox *rating_text;
+ QLineEdit *date_text;
+// QLineEdit *setting_text;
+ QLineEdit *language_text;
+ QLineEdit *nowplaying_text;
+ QLineEdit *publisher_text;
+// QLineEdit *encodedby_text;
+ QLabel *art_cover;
+
public slots:
void update( input_item_t * );
void clear();
+
+private slots:
+ void enterEditMode();
+
+signals:
+ void uriSet( QString );
+ void editing();
};
-class MetaPanel: public QWidget
+class ExtraMetaPanel: public QWidget
{
Q_OBJECT;
public:
- MetaPanel( QWidget *, intf_thread_t * );
- virtual ~MetaPanel();
+ ExtraMetaPanel( QWidget *, intf_thread_t * );
+ virtual ~ExtraMetaPanel() {};
private:
intf_thread_t *p_intf;
-
+ QTreeWidget *extraMetaTree;
public slots:
void update( input_item_t * );
void clear();
-
- char* getURI();
- char* getName();
};
-class InfoPanel: public QWidget
+class InputStatsPanel: public QWidget
{
Q_OBJECT;
public:
- InfoPanel( QWidget *, intf_thread_t * );
- virtual ~InfoPanel();
+ InputStatsPanel( QWidget *, intf_thread_t * );
+ virtual ~InputStatsPanel();
private:
intf_thread_t *p_intf;
- QTreeWidget *InfoTree;
+
+ 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 InfoTab: public QTabWidget
+class InfoPanel: public QWidget
{
Q_OBJECT;
public:
- InfoTab( QWidget *, intf_thread_t *, bool );
- virtual ~InfoTab();
- void update( input_item_t *, bool, bool );
- void clear();
+ InfoPanel( QWidget *, intf_thread_t * );
+ virtual ~InfoPanel();
private:
- bool stats;
intf_thread_t *p_intf;
- InputStatsPanel *ISP;
- MetaPanel *MP;
- InfoPanel *IP;
- int i_runs;
+ QTreeWidget *InfoTree;
+public slots:
+ void update( input_item_t * );
+ void clear();
};
-
#endif