kde interface updates

Sigmund Augdal sigmunau at stud.ntnu.no
Wed May 1 21:36:58 CEST 2002


This should be a working configuration dialog for the kde interface. It is not
well commented and probably not following coding-style guidelines, but it works
and is not too mem-leaky.

note that the kde-interface currently needs to be run from top directory of the
vlc-source because it opens the file plugins/kde/kde_ui.rc. Someone else should
decide where to put this file when installing, and how to find it again.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QConfigItem.cpp
Type: text/x-c++src
Size: 986 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QConfigItem.h
Type: text/x-chdr
Size: 760 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde_pluginsbox.cpp
Type: text/x-c++src
Size: 1967 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde_pluginsbox.h
Type: text/x-chdr
Size: 744 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde_preferences.cpp
Type: text/x-c++src
Size: 9553 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment-0002.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kde_preferences.h
Type: text/x-chdr
Size: 437 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020501/73c0e350/attachment-0002.h>
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /var/cvs/videolan/vlc/plugins/kde/Makefile,v
retrieving revision 1.6
diff -r1.6 Makefile
1c1
< MOC_SOURCES = kde_interface.moc.cpp kde_slider.moc.cpp kde_disc.moc.cpp kde_net.moc.cpp kde_menu.moc.cpp
---
> MOC_SOURCES = kde_interface.moc.cpp kde_slider.moc.cpp kde_disc.moc.cpp kde_net.moc.cpp kde_menu.moc.cpp kde_preferences.moc.cpp kde_pluginsbox.moc.cpp QConfigItem.moc.cpp
3c3
< kde_SOURCES = kde.cpp kde_interface.cpp kde_slider.cpp kde_disc.cpp kde_net.cpp kde_menu.cpp $(MOC_SOURCES)
---
> kde_SOURCES = kde.cpp kde_interface.cpp kde_slider.cpp kde_disc.cpp kde_net.cpp kde_menu.cpp kde_preferences.cpp kde_pluginsbox.cpp QConfigItem.cpp $(MOC_SOURCES)
Index: kde_interface.cpp
===================================================================
RCS file: /var/cvs/videolan/vlc/plugins/kde/kde_interface.cpp,v
retrieving revision 1.4
diff -r1.4 kde_interface.cpp
13a14
> #include "kde_preferences.h"
25a27
> #include <kdialog.h>
42a45
>     fSlider->setMaxValue(10000);
81a85
>     preferences = KStdAction::preferences(this, SLOT(slotShowPreferences()), actionCollection());
96c100
< 
---
>     
203a208,213
> void KInterface::slotShowPreferences()
> {
>     // Do something
>     KPreferences("main", this, "preferences");
> }
> 
233,234d242
<     if( p_input_bank->pp_input[0] != NULL )
<     {
236,237c244,246
<         fSlider->setValue( ( 100 * p_area->i_tell ) / p_area->i_size );
< #undef p_area
---
>     if( (p_input_bank->pp_input[0] != NULL) && (p_area->i_size != 0 ))
>     {
> 	fSlider->setValue( ( 10000. * p_area->i_tell ) / p_area->i_size );
238a248
> #undef p_area
256c266
<     off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 100;
---
>     off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 10000;
271c281
<         statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
---
>         statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 10000 ), ID_DATE );
Index: kde_interface.h
===================================================================
RCS file: /var/cvs/videolan/vlc/plugins/kde/kde_interface.h,v
retrieving revision 1.1
diff -r1.1 kde_interface.h
52a53,54
>         void slotShowPreferences();
> 
130a133
>         KAction             *preferences;


More information about the vlc-devel mailing list