Commit ec6749f1 authored by Clément Stenac's avatar Clément Stenac

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,24 +8,24 @@
<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="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>_("Streaming")</string>
<string>_("Input")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
......@@ -35,7 +35,7 @@
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="sent_text" >
<widget class="QLabel" name="read_text" >
<property name="text" >
<string>0</string>
</property>
......@@ -44,8 +44,8 @@
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLabel" name="send_bitrate_text" >
<item row="3" column="1" >
<widget class="QLabel" name="stream_bitrate_text" >
<property name="text" >
<string>0 kb/s</string>
</property>
......@@ -55,119 +55,58 @@
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="sent_bytes_text" >
<widget class="QLabel" name="input_bitrate_text" >
<property name="text" >
<string>0 kB</string>
<string>0 kb/s</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" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>_("Sent bytes")</string>
<string>_("Input bitrate")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_11" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>_("Sent packets")</string>
<string>_("Read at media")</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" >
<item row="3" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string>_("Stream bitrate")</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLabel" name="aplayed_text" >
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string>_("Demuxed")</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="adecoded_text" >
<item row="2" column="1" >
<widget class="QLabel" name="demuxed_text" >
<property name="text" >
<string>0</string>
<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_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="0" column="1" >
<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>
......@@ -231,17 +170,11 @@
</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>
</item>
<item row="1" column="1" >
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>_("Input")</string>
<string>_("Audio")</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
......@@ -250,8 +183,8 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLabel" name="read_text" >
<item row="2" column="1" >
<widget class="QLabel" name="alost_text" >
<property name="text" >
<string>0</string>
</property>
......@@ -260,56 +193,84 @@
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLabel" name="stream_bitrate_text" >
<item row="1" column="1" >
<widget class="QLabel" name="aplayed_text" >
<property name="text" >
<string>0 kb/s</string>
<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="input_bitrate_text" >
<item row="0" column="1" >
<widget class="QLabel" name="adecoded_text" >
<property name="text" >
<string>0 kb/s</string>
<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_5" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>_("Input bitrate")</string>
<string>_("Played buffers")</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>_("Read at media")</string>
<string>_("Decoded blocks")</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_3" >
</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>_("Stream bitrate")</string>
<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_7" >
<item row="2" column="1" >
<widget class="QLabel" name="send_bitrate_text" >
<property name="text" >
<string>_("Demuxed")</string>
<string>0 kb/s</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="demuxed_text" >
<item row="1" column="1" >
<widget class="QLabel" name="sent_bytes_text" >
<property name="text" >
<string>0 kB</string>
</property>
......@@ -318,8 +279,31 @@
</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>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment