Hey Jeffrey,

2014-02-27 8:52 GMT+04:00 Jeffrey Scott Flesher Gmail <
[email protected]>:

>  setCurrentVideo() here is intended to replace the video in the widget
> that
> created by WWidget* Home::video() of your code.
>
> I got the function working using the logInternalPath change, but do not
> see the difference between creating a new function called setCurrentVideo,
> or just calling video again, besides the binding...
>
Home::video() in your case should be considered just as constructor of the
widget
which is intended to show videos (i.e. has a video player), right? And this
widget should be considered as a *page*, since it has an internal path.
Note, that Home::video() *does not* adds this widget (page) into the widget
hierarchy.
Its will be done by WMenu::addItem() (actually, it will add this page into
WStackedWidget,
if you pass it in the WMenu's constructor).
Next, the WMenu handles internal path change and if the internal path
matches to "/video",
then WMenu selects the corresponding item - "video" and sets the widget
constructed by
Home::video() as the current widget of WStackedWidget which is owned by
WMenu.
As far as I understood, you want to show the video which corresponds the URL
(internal path), right? Then you need to write your own internal path
changed signal
handler (which I've posted in the previous post) since the WMenu knows
nothing about
the widget created by Home::video().
Suggested setCurrentVideo() - is just for clearly understanding how the
internal path change
handles.

-- 
// Dmitriy.
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to