Removed old useless code from ancient OSC-support system.

This commit is contained in:
Tats
2016-10-05 00:38:04 -04:00
parent 5e96d23255
commit cbc1a2b4ec
2 changed files with 0 additions and 126 deletions
-120
View File
@@ -3296,126 +3296,6 @@ void MainWindow::exitFullScreen()
// open();
// }
bool MainWindow::setTextureUri(int texture_id, const std::string &uri)
{
// TODO: const QString &
bool success = false;
Paint::ptr paint = this->mappingManager->getPaintById(texture_id);
if (paint.isNull())
{
std::cout << "No such texture paint id " << texture_id << std::endl;
success = false;
}
else
{
if (paint->getType() == "media")
{
Video *media = static_cast<Video*>(paint.data()); // FIXME: use sharedptr cast
videoTimer->stop();
success = media->setUri(QString(uri.c_str()));
videoTimer->start();
}
else if (paint->getType() == "image")
{
Image *media = (Image*) paint.data(); // FIXME: use sharedptr cast
videoTimer->stop();
success = media->setUri(QString(uri.c_str()));
videoTimer->start();
}
else
{
std::cout << "Paint id " << texture_id << " is not a media texture." << std::endl;
return false;
}
}
return success;
}
bool MainWindow::setTextureRate(int texture_id, double rate)
{
Paint::ptr paint = this->mappingManager->getPaintById(texture_id);
if (paint.isNull())
{
std::cout << "No such texture paint id " << texture_id << std::endl;
return false;
}
else
{
if (paint->getType() == "media")
{
Video *media = static_cast<Video*>(paint.data()); // FIXME: use sharedptr cast
videoTimer->stop();
media->setRate(rate);
videoTimer->start();
}
else
{
std::cout << "Paint id " << texture_id << " is not a media texture." << std::endl;
return false;
}
}
return true;
}
bool MainWindow::setTextureVolume(int texture_id, double volume)
{
Paint::ptr paint = this->mappingManager->getPaintById(texture_id);
if (paint.isNull())
{
std::cout << "No such texture paint id " << texture_id << std::endl;
return false;
}
else
{
if (paint->getType() == "media")
{
Video *media = static_cast<Video*>(paint.data()); // FIXME: use sharedptr cast
videoTimer->stop();
media->setVolume(volume);
videoTimer->start();
}
else
{
std::cout << "Paint id " << texture_id << " is not a media texture." << std::endl;
return false;
}
}
return true;
}
void MainWindow::setTexturePlayState(int texture_id, bool played)
{
Paint::ptr paint = this->mappingManager->getPaintById(texture_id);
if (paint.isNull())
{
std::cout << "No such texture paint id " << texture_id << std::endl;
}
else
{
if (paint->getType() == "media")
{
if (played)
{
videoTimer->stop();
paint->play();
videoTimer->start();
}
else
{
videoTimer->stop();
paint->pause();
videoTimer->start();
}
}
else
{
std::cout << "Paint id " << texture_id << " is not a media texture." << std::endl;
}
}
}
void MainWindow::quitMapMap()
{
close();