Adding namespace Database
This commit is contained in:
@@ -105,7 +105,7 @@ TrackWidget::handleTrackSelected(void)
|
||||
ResultType result = _queryModel.resultRow( currentIndex.row());
|
||||
|
||||
// Get the track part
|
||||
Wt::Dbo::ptr<Track> track ( result.get<0>() );
|
||||
Wt::Dbo::ptr<Database::Track> track ( result.get<0>() );
|
||||
|
||||
_trackSelected.emit( track->getPath() );
|
||||
}
|
||||
@@ -127,7 +127,7 @@ TrackWidget::selectNextTrack(void)
|
||||
ResultType result = _queryModel.resultRow( currentIndex.row() + 1 );
|
||||
|
||||
// Get the track part
|
||||
Wt::Dbo::ptr<Track> track ( result.get<0>() );
|
||||
Wt::Dbo::ptr<Database::Track> track ( result.get<0>() );
|
||||
|
||||
_trackSelected.emit( track->getPath() );
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class TrackWidget : public FilterWidget
|
||||
|
||||
DatabaseHandler& _db;
|
||||
|
||||
typedef boost::tuple<Track::pointer, Release::pointer, Artist::pointer> ResultType;
|
||||
typedef boost::tuple<Database::Track::pointer, Database::Release::pointer, Database::Artist::pointer> ResultType;
|
||||
Wt::Dbo::QueryModel< ResultType > _queryModel;
|
||||
Wt::WTableView* _tableView;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ VideoDatabaseWidget::VideoDatabaseWidget(DatabaseHandler& db, Wt::WContainerWid
|
||||
|
||||
Wt::Dbo::Transaction transaction ( _db.getSession() );
|
||||
|
||||
updateView( Path::pointer() );
|
||||
updateView( Database::Path::pointer() );
|
||||
|
||||
_table->addStyleClass("table form-inline");
|
||||
|
||||
@@ -72,7 +72,7 @@ VideoDatabaseWidget::addVideo(const std::string& name, const boost::posix_time::
|
||||
|
||||
|
||||
void
|
||||
VideoDatabaseWidget::updateView(Path::pointer directory)
|
||||
VideoDatabaseWidget::updateView(Database::Path::pointer directory)
|
||||
{
|
||||
// Clear table from row 1 to end
|
||||
// while(_table->rowCount() > 2)
|
||||
@@ -82,7 +82,7 @@ VideoDatabaseWidget::updateView(Path::pointer directory)
|
||||
|
||||
addHeader();
|
||||
|
||||
std::vector< Path::pointer > pathes;
|
||||
std::vector< Database::Path::pointer > pathes;
|
||||
if(directory)
|
||||
{
|
||||
pathes = directory->getChilds();
|
||||
@@ -90,10 +90,10 @@ VideoDatabaseWidget::updateView(Path::pointer directory)
|
||||
addDirectory("<Parent>", directory->getParent() ? directory->getParent() ->getPath() : boost::filesystem::path());
|
||||
}
|
||||
else
|
||||
pathes = Path::getRoots(_db.getSession() );
|
||||
pathes = Database::Path::getRoots(_db.getSession() );
|
||||
|
||||
// Add childs
|
||||
BOOST_FOREACH(Path::pointer path, pathes)
|
||||
BOOST_FOREACH(Database::Path::pointer path, pathes)
|
||||
{
|
||||
std::cout << "Adding path " << path->getPath() << std::endl;
|
||||
if (path->isDirectory())
|
||||
@@ -111,7 +111,7 @@ VideoDatabaseWidget::handleOpenDirectory(boost::filesystem::path path)
|
||||
{
|
||||
Wt::Dbo::Transaction transaction ( _db.getSession() );
|
||||
|
||||
Path::pointer directory = Path::getByPath(_db.getSession(), path);
|
||||
Database::Path::pointer directory = Database::Path::getByPath(_db.getSession(), path);
|
||||
updateView(directory);
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ VideoDatabaseWidget::handlePlayVideo(const boost::filesystem::path& videoFilePat
|
||||
|
||||
Wt::Dbo::Transaction transaction ( _db.getSession() );
|
||||
|
||||
Path::pointer path = Path::getByPath(_db.getSession(), videoFilePath);
|
||||
Video::pointer video;
|
||||
Database::Path::pointer path = Database::Path::getByPath(_db.getSession(), videoFilePath);
|
||||
Database::Video::pointer video;
|
||||
if (path)
|
||||
video = path->getVideo();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class VideoDatabaseWidget : public Wt::WContainerWidget
|
||||
private:
|
||||
|
||||
|
||||
void updateView(Path::pointer directory);
|
||||
void updateView(Database::Path::pointer directory);
|
||||
void handleOpenDirectory(boost::filesystem::path directory);
|
||||
void handlePlayVideo(const boost::filesystem::path& path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user