Commit 2b5cb724 authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf

qt4: rename a couple of methods to be more explicit

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 7317861d
......@@ -94,13 +94,13 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf )
#endif
CONNECT( buttonsBox, rejected(), this, close() );
readSettings( "Bookmarks", QSize( 435, 280 ) );
restoreWidgetPosition( "Bookmarks", QSize( 435, 280 ) );
updateGeometry();
}
BookmarksDialog::~BookmarksDialog()
{
writeSettings( "Bookmarks" );
saveWidgetPosition( "Bookmarks" );
}
void BookmarksDialog::update()
......
......@@ -96,12 +96,12 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
CONNECT( timer, timeout(), this, updateInfos() );
updateInfos();
readSettings( "EPGDialog", QSize( 650, 450 ) );
restoreWidgetPosition( "EPGDialog", QSize( 650, 450 ) );
}
EpgDialog::~EpgDialog()
{
writeSettings( "EPGDialog" );
saveWidgetPosition( "EPGDialog" );
}
void EpgDialog::displayEvent( EPGItem *epgItem )
......
......@@ -70,12 +70,12 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
layout->addWidget( closeButtonBox );
CONNECT( closeButtonBox, rejected(), this, close() );
readSettings( "Help", QSize( 500, 450 ) );
restoreWidgetPosition( "Help", QSize( 500, 450 ) );
}
HelpDialog::~HelpDialog()
{
writeSettings( "Help" );
saveWidgetPosition( "Help" );
}
AboutDialog::AboutDialog( intf_thread_t *_p_intf)
......
......@@ -125,12 +125,12 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
if( p_item )
updateAllTabs( p_item );
readSettings( "Mediainfo", QSize( 600 , 480 ) );
restoreWidgetPosition( "Mediainfo", QSize( 600 , 480 ) );
}
MediaInfoDialog::~MediaInfoDialog()
{
writeSettings( "Mediainfo" );
saveWidgetPosition( "Mediainfo" );
}
void MediaInfoDialog::showTab( int i_tab = 0 )
......
......@@ -114,7 +114,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
CONNECT( ui.mainTab, currentChanged( int ), this, tabChanged( int ) );
/* General action */
readSettings( "Messages", QSize( 600, 450 ) );
restoreWidgetPosition( "Messages", QSize( 600, 450 ) );
/* Hook up to LibVLC messaging */
vlc_Subscribe( &sub, MsgCallback, this );
......@@ -122,7 +122,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
MessagesDialog::~MessagesDialog()
{
writeSettings( "Messages" );
saveWidgetPosition( "Messages" );
vlc_Unsubscribe( &sub );
};
......
......@@ -75,12 +75,12 @@ PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
box->addButton( okButton, QDialogButtonBox::RejectRole );
layout->addWidget( box );
BUTTONACT( okButton, close() );
readSettings( "PluginsDialog", QSize( 435, 280 ) );
restoreWidgetPosition( "PluginsDialog", QSize( 435, 280 ) );
}
PluginDialog::~PluginDialog()
{
writeSettings( "PluginsDialog" );
saveWidgetPosition( "PluginsDialog" );
}
/* Plugins tab */
......@@ -125,7 +125,7 @@ PluginTab::PluginTab( intf_thread_t *p_intf_ )
this, search( const QString& ) );
setMinimumSize( 500, 300 );
readSettings( "Plugins", QSize( 540, 400 ) );
restoreWidgetPosition( "Plugins", QSize( 540, 400 ) );
}
inline void PluginTab::FillTree()
......@@ -164,7 +164,7 @@ void PluginTab::search( const QString& qs )
PluginTab::~PluginTab()
{
writeSettings( "Plugins" );
saveWidgetPosition( "Plugins" );
getSettings()->setValue( "Plugins/Header-State",
treePlugins->header()->saveState() );
}
......
......@@ -113,14 +113,14 @@ public:
protected:
intf_thread_t *p_intf;
void readSettings( const QString& name,
void restoreWidgetPosition( const QString& name,
QSize defSize = QSize( 1, 1 ),
QPoint defPos = QPoint( 0, 0 ) )
{
QVLCTools::restoreWidgetPosition(p_intf, name, this, defSize, defPos);
}
void writeSettings( const QString& name )
void saveWidgetPosition( const QString& name )
{
QVLCTools::saveWidgetPosition( p_intf, name, this);
}
......
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