Added helpers to simplify session data accesses. Made the CoverResource global to the session

This commit is contained in:
emeric
2015-06-07 21:00:37 +02:00
parent 43211d8aee
commit 530c8dc44d
49 changed files with 407 additions and 518 deletions
+16 -1
View File
@@ -47,6 +47,21 @@ AudioMediaPlayer::AudioMediaPlayer( Wt::WMediaPlayer::Encoding encoding, Wt::WCo
Wt::WVBoxLayout* mainLayout = new Wt::WVBoxLayout();
this->setLayout(mainLayout);
/* TODO add media info here
// Current Media info
Wt::WHBoxLayout *currentMediaLayout = new Wt::WHBoxLayout();
mainLayout->addLayout(currentMediaLayout);
currentMediaLayout->addWidget( _mediaCover = new Wt::WImage());
_mediaCover->setImageLink( Wt::WLink("images/unknown-cover.jpg") );
Wt::WVBoxLayout* mediaInfoLayout = new Wt::WVBoxLayout();
currentMediaLayout->addLayout(mediaInfoLayout, 1);
mediaInfoLayout->addWidget( _mediaTitle = new Wt::WText());
mediaInfoLayout->addWidget( _mediaArtistRelease = new Wt::WText());
*/
// Time control
Wt::WHBoxLayout *sliderLayout = new Wt::WHBoxLayout();
mainLayout->addLayout(sliderLayout);
@@ -56,6 +71,7 @@ AudioMediaPlayer::AudioMediaPlayer( Wt::WMediaPlayer::Encoding encoding, Wt::WCo
sliderLayout->addWidget(_duration = new Wt::WText("00:00:00"));
_duration->setLineHeight(30);
// Controls
Wt::WHBoxLayout *controlsLayout = new Wt::WHBoxLayout();
mainLayout->addLayout(controlsLayout);
@@ -63,7 +79,6 @@ AudioMediaPlayer::AudioMediaPlayer( Wt::WMediaPlayer::Encoding encoding, Wt::WCo
Wt::WContainerWidget *btnContainer = new Wt::WContainerWidget();
// Do not allow button to wrap
btnContainer->setMinimumSize(155, Wt::WLength::Auto);
Wt::WTemplate *t = new Wt::WTemplate(Wt::WString::tr("mediaplayer-controls"), btnContainer);
Wt::WPushButton *prevBtn = new Wt::WPushButton("<<");