info_panels.hpp 4.06 KB
Newer Older
zorglub's avatar
zorglub committed
1
2
3
/*****************************************************************************
 * infopanels.hpp : Panels for the information dialogs
 ****************************************************************************
4
 * Copyright (C) 2006-2007 the VideoLAN team
5
 * $Id$
zorglub's avatar
zorglub committed
6
7
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
8
 *          Jean-Baptiste Kempf <jb@videolan.org>
9
 *          Ilkka Ollakka <ileoo@videolan.org>
10
 *
zorglub's avatar
zorglub committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * 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
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef _INFOPANELS_H_
#define _INFOPANELS_H_
28

Christophe Mutricy's avatar
Christophe Mutricy committed
29
30
31
32
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

33
#include <vlc_common.h>
34
35
#include <vlc_meta.h>

zorglub's avatar
zorglub committed
36
#include <QWidget>
Christophe Mutricy's avatar
Christophe Mutricy committed
37
#include <QLabel>
38

39
#include <limits.h>
40
41
42
43
44
45

#define setSpinBounds( spinbox ) {               \
    spinbox->setRange( 0, INT_MAX );             \
    spinbox->setAccelerated( true ) ;            \
    spinbox->setAlignment( Qt::AlignRight );     \
    spinbox->setSpecialValueText(""); }
46
47

class QTreeWidget;
48
class QTreeWidgetItem;
49
50
51
class QTreeView;
class QSpinBox;
class QLineEdit;
52
class CoverArtLabel;
53
54
55
56
57
58
59

class MetaPanel: public QWidget
{
    Q_OBJECT;
public:
    MetaPanel( QWidget *, intf_thread_t * );
    virtual ~MetaPanel();
Ilkka Ollakka's avatar
   
Ilkka Ollakka committed
60
    void saveMeta();
61

62
63
    bool isInEditMode();
    void setEditMode( bool );
64

65
private:
Ilkka Ollakka's avatar
   
Ilkka Ollakka committed
66
    input_item_t *p_input;
67
    intf_thread_t *p_intf;
68
69
    bool b_inEditMode;

70
71
72
    QLineEdit *title_text;
    QLineEdit *artist_text;
    QLineEdit *genre_text;
73
    QLineEdit *copyright_text;
74
    QLineEdit *collection_text;
75
    QLineEdit *seqnum_text;
76
    QLineEdit *description_text;
77
//    QSpinBox *rating_text;
78
    QLineEdit *date_text;
79
//    QLineEdit *setting_text;
80
    QLineEdit *language_text;
81
82
    QLineEdit *nowplaying_text;
    QLineEdit *publisher_text;
83
//    QLineEdit *encodedby_text;
84
    CoverArtLabel *art_cover;
85

86
87
88
public slots:
    void update( input_item_t * );
    void clear();
89
90
91

private slots:
    void enterEditMode();
92

93
94
signals:
    void uriSet( QString );
Ilkka Ollakka's avatar
   
Ilkka Ollakka committed
95
    void editing();
96
97
};

98
99
100
101
102
103
104
105
106
107
108
109
110
class ExtraMetaPanel: public QWidget
{
    Q_OBJECT;
public:
    ExtraMetaPanel( QWidget *, intf_thread_t * );
    virtual  ~ExtraMetaPanel() {};
private:
    intf_thread_t *p_intf;
    QTreeWidget *extraMetaTree;
public slots:
    void update( input_item_t * );
    void clear();
};
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

class InputStatsPanel: public QWidget
{
    Q_OBJECT;
public:
    InputStatsPanel( QWidget *, intf_thread_t * );
    virtual ~InputStatsPanel();
private:
    intf_thread_t *p_intf;

    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;
132
    QTreeWidgetItem *vfps_stat;
133
134
135
136
137
138
139
140
141
142

    QTreeWidgetItem *streaming;
    QTreeWidgetItem *send_stat;
    QTreeWidgetItem *send_bytes_stat;
    QTreeWidgetItem *send_bitrate_stat;

    QTreeWidgetItem *audio;
    QTreeWidgetItem *adecoded_stat;
    QTreeWidgetItem *aplayed_stat;
    QTreeWidgetItem *alost_stat;
143
144

public slots:
zorglub's avatar
zorglub committed
145
146
    void update( input_item_t * );
    void clear();
147
148
149
150
151
152
153
154
155
156
};

class InfoPanel: public QWidget
{
    Q_OBJECT;
public:
    InfoPanel( QWidget *, intf_thread_t * );
    virtual ~InfoPanel();
private:
    intf_thread_t *p_intf;
157
    QTreeWidget *InfoTree;
158
public slots:
zorglub's avatar
zorglub committed
159
160
161
    void update( input_item_t * );
    void clear();
};
Christophe Mutricy's avatar
Christophe Mutricy committed
162

zorglub's avatar
zorglub committed
163
#endif