vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Wed Feb 8 12:31:02 2012 +0100| [569fb30f36d3c7be8891bb053955d5884db5307f] | committer: Jean-Baptiste Kempf
Qt: provide overloaded checkbox_list method Signed-off-by: Jean-Baptiste Kempf <[email protected]> (cherry picked from commit effc65ccba7bb037e3c3b7d8ca0a07a45ae07c4c) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=569fb30f36d3c7be8891bb053955d5884db5307f --- modules/gui/qt4/components/preferences_widgets.cpp | 16 ++++++++++++++++ modules/gui/qt4/components/preferences_widgets.hpp | 1 + 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index 20ffa05..5c0ed71 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -741,6 +741,22 @@ void ModuleListConfigControl::checkbox_lists( module_t *p_parser ) cbl->checkBox->setChecked( true ); } +void ModuleListConfigControl::checkbox_lists( QString label, QString help, const char* psz_module ) +{ + QCheckBox *cb = new QCheckBox( label ); + checkBoxListItem *cbl = new checkBoxListItem; + + CONNECT( cb, stateChanged( int ), this, onUpdate() ); + if( !help.isEmpty() ) + cb->setToolTip( formatTooltip( help ) ); + cbl->checkBox = cb; + + cbl->psz_module = strdup( psz_module ); + modules.append( cbl ); + + if( p_item->value.psz && strstr( p_item->value.psz, cbl->psz_module ) ) + cbl->checkBox->setChecked( true ); +} void ModuleListConfigControl::finish( bool bycat ) { diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp index bc509be..f7d7e36 100644 --- a/modules/gui/qt4/components/preferences_widgets.hpp +++ b/modules/gui/qt4/components/preferences_widgets.hpp @@ -395,6 +395,7 @@ public slots: private: void finish( bool ); void checkbox_lists(module_t*); + void checkbox_lists( QString, QString, const char* ); QList<checkBoxListItem*> modules; QGroupBox *groupBox; QLineEdit *text; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
