Commit ec6749f1 authored by zorglub's avatar zorglub
Browse files

Autosave size/position + fix a resizing bug in the stats panel

Cosmetics
parent 7db11385
......@@ -39,7 +39,6 @@ StreamInfoDialog::StreamInfoDialog( intf_thread_t *_p_intf ) :QVLCFrame( _p_intf
i_runs = 0;
setWindowTitle( _("Stream information" ) );
QGridLayout *layout = new QGridLayout(this);
setGeometry(0,0,470,550);
IT = new InfoTab( this, p_intf, true ) ;
QPushButton *closeButton = new QPushButton(qtr("&Close"));
......@@ -51,11 +50,14 @@ StreamInfoDialog::StreamInfoDialog( intf_thread_t *_p_intf ) :QVLCFrame( _p_intf
p_input = NULL;
var_AddCallback( THEPL, "item-change", ItemChanged, this );
readSettings( "StreamInfo" , QSize( 470, 450 ) );
}
StreamInfoDialog::~StreamInfoDialog()
{
var_DelCallback( THEPL, "item-change", ItemChanged, this );
writeSettings( "StreamInfo" );
}
static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
......
......@@ -18,7 +18,8 @@
*
* 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. *****************************************************************************/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
******************************************************************************/
#ifndef _STREAMINFO_DIALOG_H_
#define _STREAMINFO_DIALOG_H_
......@@ -39,6 +40,7 @@ public:
instance = new StreamInfoDialog( p_intf);
return instance;
}
static void killInstance() { if( instance ) delete instance; }
virtual ~StreamInfoDialog();
bool need_update;
private:
......
......@@ -56,6 +56,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
DialogsProvider::~DialogsProvider()
{
PlaylistDialog::killInstance();
StreamInfoDialog::killInstance();
}
void DialogsProvider::customEvent( QEvent *event )
......
......@@ -8,318 +8,302 @@
<rect>
<x>0</x>
<y>0</y>
<width>437</width>
<height>300</height>
<width>434</width>
<height>294</height>
</rect>
</property>
<property name="windowTitle" >
<string>_("Form")</string>
</property>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>9</x>
<y>153</y>
<width>207</width>
<height>138</height>
</rect>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="title" >
<string>_("Streaming")</string>
<property name="spacing" >
<number>6</number>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="sent_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="send_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="sent_bytes_text" >
<property name="text" >
<string>0 kB</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>_("Send bitrate")</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_12" >
<property name="text" >
<string>_("Sent bytes")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_11" >
<property name="text" >
<string>_("Sent packets")</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_4" >
<property name="geometry" >
<rect>
<x>222</x>
<y>153</y>
<width>206</width>
<height>138</height>
</rect>
</property>
<property name="title" >
<string>_("Audio")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="1" >
<widget class="QLabel" name="alost_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="aplayed_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="adecoded_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<string>_("Lost buffers")</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>_("Played buffers")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>_("Decoded blocks")</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>222</x>
<y>9</y>
<width>206</width>
<height>138</height>
</rect>
</property>
<property name="title" >
<string>_("Video")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>_("Lost frames")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="vlost_frames" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>_("Displayed frames")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>_("Decoded blocks")</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="vdecoded_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="vdisplayed_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>9</x>
<y>9</y>
<width>207</width>
<height>138</height>
</rect>
</property>
<property name="title" >
<string>_("Input")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="read_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLabel" name="stream_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="input_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>_("Input bitrate")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>_("Read at media")</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>_("Stream bitrate")</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>_("Demuxed")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="demuxed_text" >
<property name="text" >
<string>0 kB</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>_("Input")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="read_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLabel" name="stream_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="input_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>_("Input bitrate")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>_("Read at media")</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>_("Stream bitrate")</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>_("Demuxed")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="demuxed_text" >
<property name="text" >
<string>0 kB</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>_("Video")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>_("Lost frames")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="vlost_frames" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>_("Displayed frames")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>_("Decoded blocks")</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="vdecoded_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="vdisplayed_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" >
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>_("Audio")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="1" >
<widget class="QLabel" name="alost_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="aplayed_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="adecoded_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<string>_("Lost buffers")</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>_("Played buffers")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>_("Decoded blocks")</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>_("Streaming")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="sent_text" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="send_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="sent_bytes_text" >
<property name="text" >
<string>0 kB</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>_("Send bitrate")</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_12" >
<property name="text" >
<string>_("Sent bytes")</string>
</property>
</widget>
</item>
<item row="0" column="0" >