Created UserInterface namespace, WebServerService -> UserInterfaceService.
This commit is contained in:
@@ -11,10 +11,11 @@
|
||||
|
||||
#include "VideoDatabaseWidget.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
VideoDatabaseWidget::VideoDatabaseWidget( Wt::WContainerWidget *parent)
|
||||
VideoDatabaseWidget::VideoDatabaseWidget(DatabaseHandler& db, Wt::WContainerWidget *parent)
|
||||
: Wt::WContainerWidget(parent),
|
||||
_db("test.db") // TODO
|
||||
_db(db)
|
||||
{
|
||||
_table = new Wt::WTable( this );
|
||||
_table->setHeaderCount(1);
|
||||
@@ -137,3 +138,5 @@ VideoDatabaseWidget::handlePlayVideo(const boost::filesystem::path& videoFilePat
|
||||
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
#include <Wt/WTable>
|
||||
#include <Wt/WContainerWidget>
|
||||
|
||||
#include "database/DatabaseHandler.hpp"
|
||||
#include "common/SessionData.hpp"
|
||||
#include "database/FileTypes.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class VideoDatabaseWidget : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
VideoDatabaseWidget( Wt::WContainerWidget *parent = 0);
|
||||
VideoDatabaseWidget( DatabaseHandler& db, Wt::WContainerWidget *parent = 0);
|
||||
|
||||
// Signals
|
||||
Wt::Signal< boost::filesystem::path >& playVideo() { return _playVideo; }
|
||||
@@ -26,13 +28,14 @@ class VideoDatabaseWidget : public Wt::WContainerWidget
|
||||
void addDirectory(const std::string& name, const boost::filesystem::path& path);
|
||||
void addVideo(const std::string& name, const boost::posix_time::time_duration& duration, const boost::filesystem::path& path);
|
||||
|
||||
Wt::Signal< boost::filesystem::path > _playVideo;
|
||||
DatabaseHandler& _db;
|
||||
|
||||
DatabaseHandler _db;
|
||||
Wt::Signal< boost::filesystem::path > _playVideo;
|
||||
|
||||
Wt::WTable* _table;
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "VideoMediaPlayerWidget.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
Wt::WMediaPlayer::Encoding
|
||||
convert(Transcode::Format format)
|
||||
@@ -178,3 +179,5 @@ VideoMediaPlayerWidget::handleParametersDone(Wt::WDialog::DialogCode code)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "transcode/Parameters.hpp"
|
||||
#include "resource/AvConvTranscodeStreamResource.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class VideoMediaPlayerWidget : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
@@ -58,6 +60,7 @@ class VideoMediaPlayerWidget : public Wt::WContainerWidget
|
||||
VideoParametersDialog* _dialog;
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
using namespace Transcode;
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
static const std::list<Stream::Type> streamTypes = {Stream::Video, Stream::Audio, Stream::Subtitle};
|
||||
|
||||
VideoParametersDialog::VideoParametersDialog(const Wt::WString &windowTitle, Wt::WDialog* parent)
|
||||
@@ -165,4 +167,5 @@ VideoParametersDialog::save(Transcode::Parameters& parameters)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "transcode/Parameters.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class VideoParametersDialog : public Wt::WDialog
|
||||
{
|
||||
public:
|
||||
@@ -43,5 +45,7 @@ class VideoParametersDialog : public Wt::WDialog
|
||||
std::map<Transcode::Stream::Type, std::pair<Wt::WComboBox*, Wt::WStringListModel* > > _streamSelection;
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
|
||||
#include "VideoWidget.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
VideoWidget::VideoWidget(Wt::WContainerWidget* parent )
|
||||
: Wt::WContainerWidget(parent)
|
||||
VideoWidget::VideoWidget(SessionData& sessionData, Wt::WContainerWidget* parent )
|
||||
: Wt::WContainerWidget(parent),
|
||||
_sessionData(sessionData)
|
||||
{
|
||||
|
||||
_videoDbWidget = new VideoDatabaseWidget(this);
|
||||
_videoDbWidget = new VideoDatabaseWidget(_sessionData.getDatabaseHandler(), this);
|
||||
|
||||
_videoDbWidget->playVideo().connect(this, &VideoWidget::playVideo);
|
||||
|
||||
@@ -61,3 +63,5 @@ VideoWidget::playVideo(boost::filesystem::path p)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
|
||||
@@ -5,14 +5,18 @@
|
||||
|
||||
#include <Wt/WContainerWidget>
|
||||
|
||||
#include "common/SessionData.hpp"
|
||||
|
||||
#include "video/VideoMediaPlayerWidget.hpp"
|
||||
#include "video/VideoDatabaseWidget.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class VideoWidget : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
|
||||
VideoWidget(Wt::WContainerWidget* parent = 0);
|
||||
VideoWidget(SessionData& sessionData, Wt::WContainerWidget* parent = 0);
|
||||
|
||||
void search(const std::string& searchText);
|
||||
|
||||
@@ -21,10 +25,14 @@ class VideoWidget : public Wt::WContainerWidget
|
||||
void backToList(void);
|
||||
void playVideo(boost::filesystem::path p);
|
||||
|
||||
SessionData& _sessionData;
|
||||
|
||||
VideoDatabaseWidget* _videoDbWidget;
|
||||
VideoMediaPlayerWidget* _mediaPlayer;
|
||||
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user