Commit ec6749f1 authored by zorglub's avatar zorglub

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