#include "components/infopanels.hpp"
#include "qt4.hpp"
-#include "ui/input_stats.h"
-#include <QWidget>
+
+#include <QTreeWidget>
+#include <QPushButton>
InputStatsPanel::InputStatsPanel( QWidget *parent, intf_thread_t *_p_intf ) :
QWidget( parent ), p_intf( _p_intf )
vlc_mutex_unlock(& p_item->p_stats->lock );
}
+
+void InputStatsPanel::Clear()
+{
+}
+
+MetaPanel::MetaPanel( QWidget *parent, intf_thread_t *_p_intf ) :
+ QWidget( parent ), p_intf( _p_intf )
+{
+
+}
+MetaPanel::~MetaPanel()
+{
+}
+void MetaPanel::Update( input_item_t *p_item)
+{
+}
+void MetaPanel::Clear()
+{
+}
+
+char* MetaPanel::GetURI()
+{
+ char *URI;
+ return URI;
+}
+
+char* MetaPanel::GetName()
+{
+ char *Name;
+ return Name;
+}
+
+InfoPanel::InfoPanel( QWidget *parent, intf_thread_t *_p_intf ) :
+ QWidget( parent ), p_intf( _p_intf )
+{
+}
+InfoPanel::~InfoPanel()
+{
+}
+void InfoPanel::Update( input_item_t *p_item)
+{
+}
+void InfoPanel::Clear()
+{
+}
+
#ifndef _INFOPANELS_H_
#define _INFOPANELS_H_
+
#include <vlc/vlc.h>
+#include <vlc_meta.h>
+
#include <QWidget>
+
#include "ui/input_stats.h"
+
+class QTreeWidget;
+
class InputStatsPanel: public QWidget
{
Q_OBJECT;
public slots:
void Update( input_item_t * );
+ void Clear();
};
+class MetaPanel: public QWidget
+{
+ Q_OBJECT;
+public:
+ MetaPanel( QWidget *, intf_thread_t * );
+ virtual ~MetaPanel();
+private:
+ intf_thread_t *p_intf;
+
+public slots:
+ void Update( input_item_t * );
+ void Clear();
+
+ char* GetURI();
+ char* GetName();
+};
+
+class InfoPanel: public QWidget
+{
+ Q_OBJECT;
+public:
+ InfoPanel( QWidget *, intf_thread_t * );
+ virtual ~InfoPanel();
+private:
+ intf_thread_t *p_intf;
+
+public slots:
+ void Update( input_item_t * );
+ void Clear();
+};
#endif
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
-#include "input_manager.hpp"
+#include <QTabWidget>
+#include <QBoxLayout>
+
#include "dialogs/streaminfo.hpp"
+#include "input_manager.hpp"
#include "dialogs_provider.hpp"
#include "util/qvlcframe.hpp"
#include "components/infopanels.hpp"
#include "qt4.hpp"
+/* This is the dialog Windows */
StreamInfoDialog *StreamInfoDialog::instance = NULL;
StreamInfoDialog::StreamInfoDialog( intf_thread_t *_p_intf, bool _main_input ) :
QVLCFrame( _p_intf ), main_input( _main_input )
{
setWindowTitle( _("Stream information" ) );
- ISP = new InputStatsPanel( this, p_intf );
+ QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom,this);
+ setGeometry(0,0,470,550);
+
+ IT = new InfoTab( this, p_intf) ;
+ QPushButton *closeButton = new QPushButton(qtr("&Close"));
+ layout->addWidget(IT);
+ layout->addWidget(closeButton);
+
+ BUTTONACT( closeButton, close() );
ON_TIMEOUT( update() );
p_input = NULL;
}
void StreamInfoDialog::update()
{
- if( main_input )
- p_input = MainInputManager::getInstance( p_intf )->getInput();
- if( p_input && !p_input->b_dead )
- ISP->Update( p_input->input.p_item );
+ IT->update();
}
StreamInfoDialog::~StreamInfoDialog()
{
}
+
+void StreamInfoDialog::close()
+{
+ this->toggleVisible();
+}
+
+/* This is the tab Widget Inside the windows*/
+InfoTab::InfoTab( QWidget *parent, intf_thread_t *_p_intf ) :
+ QTabWidget( parent ), p_intf( _p_intf )
+{
+ setGeometry(0, 0, 400, 500);
+
+ ISP = new InputStatsPanel( NULL, p_intf );
+ MP = new MetaPanel(NULL, p_intf);
+ IP = new InfoPanel(NULL, p_intf);
+
+ addTab(MP, qtr("&Meta"));
+ addTab(ISP, qtr("&Stats"));
+ addTab(IP, qtr("&Info"));
+}
+
+InfoTab::~InfoTab()
+{
+}
+
+void InfoTab::update()
+{
+ if( p_intf )
+ p_input = MainInputManager::getInstance( p_intf )->getInput();
+ if( p_input && !p_input->b_dead )
+ ISP->Update( p_input->input.p_item );
+}
+