Greetings all,<br><br>For the past few days I was trying to add and fork the code as per the suggestions of dev community. <br>First of all I tried to make a Ticker widget which scrolls the text in case text's width exceeds widget's width. I used QPainter to do that but that consumed a lot of CPU the way I coded then I used counters to scroll char per unit time period which gave jerky output. So, I'm dropping the idea right now. <br>

If anyone wants to work on Ticker/Marquee widget, read my article on Ticker in which i tried to describe few ways to do that and has CPP source code: <a href="http://rohityadav.wordpress.com/2009/06/08/the-ticker-that-stopped-ticking/">http://rohityadav.wordpress.com/2009/06/08/the-ticker-that-stopped-ticking/</a><br>

<br><span style="color: rgb(51, 0, 51);">> +    /* Add Widgets to 'controls' container: Play/Pause, Previous, Next */</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +    QHBoxLayout *controls = new QHBoxLayout();</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +    QVBoxLayout *controlDock = new QVBoxLayout();</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
Why not a QGridLayout?</span><br>In this patch I used QGridLayout, but it showed inconsistency(Due to word wrapping) as songs changed so I reverted back to QBoxLayouts. If not that, I have to use at least two BoxLayouts with QGridLayout to avoid word-wrapping issues.<br style="color: rgb(51, 0, 51);">

<div id=":1o3" class="ii gt"><br>
<span style="color: rgb(51, 0, 51);">Do we really need CSS, when using SvG?</span><br>The best way to customise a QWidget is to use CSS. The setStyleSheet() is a part of QWidget and hence won't consume space for another module. I think Qt software people have given us a nice API :-)<br>

I also tried to hack in Qt4.5 source but could n't find good ways to customise the QSliders(Found some ways by QPalette though, but the result was dull) the way I did with CSS. So, kindly members of the community are requested that if they have made their mind of not using CSS, they can customise the widget (Even after wasting 4 days I got nothing) and do share the code, I would like to learn.<br>


<br>
<span style="color: rgb(51, 0, 51);">> +    timer->setInterval( 5000 );</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
Use the same as FSC configuration variable.</span><br>JB-I don't know what you mean by that, my aim was to hide the widget and not fade it(may be in future patches using Qt-Kinetics).<br style="color: rgb(51, 0, 51);">


<br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +    connect( timer, SIGNAL( timeout() ), this, SLOT( hideWidget() ) );</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
CONNECT?</span><br style="color: rgb(51, 0, 51);">
All the coding style mistakes were corrected, but I using DISCONNECT() gave compilation error. So, I used disconnect(<span style="color: rgb(51, 0, 51);"> timer, SIGNAL( timeout() ), this, SLOT( hideWidget() </span>) instead. <br>

Add DISCONNECT #define wherever CONNECT() is #define-d. Or edit it.<br>  <br>
<span style="color: rgb(51, 0, 51);">> +/* Volume Control Interfaces */</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +#define MNW_MAX_VOLUME 200</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +void MiniModeWidget::</span><span style="color: rgb(51, 0, 51);">notifierVolumeChanged( int i_vol )</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +{</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +    int i_res = ( i_vol )  * ( AOUT_VOLUME_MAX / 2 ) / MNW_MAX_VOLUME;</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +    aout_VolumeSet( p_intf, i_res );</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
> +}</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
This should go to Action_Manager.hpp</span><br>I don't understand what exactly is wanted here. Refer that, this code was forked from SoundWidget class that does n't use Action Manager. If this is to be fixed then fix SoundWidget first in controller_widget.cpp/hpp <br style="color: rgb(51, 0, 51);">


<br>
<span style="color: rgb(51, 0, 51);">> +void MiniModeWidget::dropEvent( QDropEvent *event )</span><br style="color: rgb(51, 0, 51);"><span style="color: rgb(51, 0, 51);">
DO NOT duplicate code. Find a way to pass it to MI.</span></div>Fixed, passed a signal to MainInterface.<br><br><span style="color: rgb(51, 0, 51);">> +/* Sync UI Elements with Main Interface UI */</span><br style="color: rgb(51, 0, 51);">

<span style="color: rgb(51, 0, 51);">
> +void MiniModeWidget::</span><div style="color: rgb(51, 0, 51);" id=":1ud" class="ii gt">syncNotifierController( const int &i_status )<br>
> +{<br>
> +    switch( i_status )<br>
> +    {<br>
> +        case 2: svgPlay->load(tr(":/svgs/pause.svg") ); b_toggle = false; break;<br>
> +        case 4: /* STOP */<br>
> +        case 3: svgPlay->load(tr(":/svgs/play.svg") );  b_toggle = true;  break;<br>
> +        default: break;<br>
> +    }<br>
> +}<br>
<br>
States are generally better expressed with enumerated types instead of<br>
bare numbers. Documenting the fall-through would be good, too.</div>Enums fixed, taken from vlc_input.h. Edit it if you think it's algorithimically bad.<br><br><b>Regarding SVGs</b><br>Svgs has it's right for existence. The processing taken to render SVGs is feasible and almost ~PNG.<br>

Using QtSVG will add a module but with SVG we can increase the quality of application. Like, my future aims are to re-construct the Fullscreen Controller and into a cool UI like the one in Mac OSX or even better and develop more widgets. Then, I can use the same SVGs use in this widget. So, we can reuse our resources without affecting the quality. I can volunteer to design all the pixmaps in SVGs. I think I have gained a certain amount of artistic skills :-) to design them during the past 1-2 months.<br>

I'm <b>not against not using SVGs</b>. I'm now working on forking the widget to use PNGs instead of using SVG and will send that patch asap.<br><br>Ps. Devs, see to minor errors you can edit them :-) I'll be going on a short vacation, so won't be available.<br>

<br>Comment. Forgive me for all my mistakes so far, do correct them. Thanks for your all your support, esp. J-B, jpd, jetru.<br><br>Looking forward to your suggestion and comments.<br><br>Regards,<br>Rohit Yadav<br>The Geek Says "Signing In and Signing Out".<br>

<a href="http://rohityadav.wordpress.com">rohityadav.wordpress.com</a><br>