Skip to content

Commit

Permalink
Cleanup and remove dead code after BlueBrain#23
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Dumusc committed May 25, 2016
1 parent 5deafee commit 0942671
Show file tree
Hide file tree
Showing 56 changed files with 119 additions and 3,758 deletions.
2 changes: 1 addition & 1 deletion apps/Launcher/Launcher.cpp
Expand Up @@ -75,7 +75,7 @@ Launcher::Launcher( int& argc, char* argv[] )
// FileBrowser setup
const auto filters = ContentFactory::getSupportedFilesFilter();
item->setProperty( "filesFilter", filters );
item->setProperty( "rootFilesFolder", config.getDockStartDir( ));
item->setProperty( "rootFilesFolder", config.getContentDir( ));
item->setProperty( "rootSessionsFolder", config.getSessionsDir( ));

QQmlEngine* engine = _qmlStreamer->getQmlEngine();
Expand Down
6 changes: 1 addition & 5 deletions tests/cpp/core/CommandLineOptionsTests.cpp
@@ -1,5 +1,5 @@
/*********************************************************************/
/* Copyright (c) 2013, EPFL/Blue Brain Project */
/* Copyright (c) 2013-2016, EPFL/Blue Brain Project */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* */
Expand Down Expand Up @@ -55,7 +55,6 @@ BOOST_AUTO_TEST_CASE( testCommandLineDefaults )
BOOST_CHECK( !options.getHelp() );
BOOST_CHECK_EQUAL( options.getStreamname().toStdString(), "" );
BOOST_CHECK_EQUAL( options.getPixelStreamerType(), PS_UNKNOWN );
BOOST_CHECK_EQUAL( options.getRootDir().toStdString(), "" );
BOOST_CHECK_EQUAL( options.getUrl().toStdString(), "" );
BOOST_CHECK_EQUAL( options.getConfiguration().toStdString(), "" );

Expand All @@ -71,7 +70,6 @@ void setOptionParameters( CommandLineOptions& options )
options.setHelp( true );
options.setStreamname( "MyStreamer" );
options.setPixelStreamerType( PS_WEBKIT );
options.setRootDir( "/home/me/my_folder" );
options.setUrl( "http://www.perdu.com" );
options.setHeight( 640 );
options.setWidth( 480 );
Expand All @@ -83,7 +81,6 @@ void checkOptionParameters( const CommandLineOptions& options )
BOOST_CHECK( options.getHelp() );
BOOST_CHECK_EQUAL( options.getStreamname().toStdString(), "MyStreamer" );
BOOST_CHECK_EQUAL( options.getPixelStreamerType(), PS_WEBKIT );
BOOST_CHECK_EQUAL( options.getRootDir().toStdString(), "/home/me/my_folder" );
BOOST_CHECK_EQUAL( options.getUrl().toStdString(), "http://www.perdu.com" );
BOOST_CHECK_EQUAL( options.getHeight(), 640 );
BOOST_CHECK_EQUAL( options.getWidth(), 480 );
Expand All @@ -93,7 +90,6 @@ void checkOptionParameters( const CommandLineOptions& options )
BOOST_CHECK_EQUAL( options.getCommandLine().toStdString(),
"--type webkit --width 480 --height 640 --help "
"--streamname MyStreamer --url http://www.perdu.com "
"--rootdir /home/me/my_folder "
"--config /path/to/configuration.xml" );
}

Expand Down
8 changes: 4 additions & 4 deletions tests/cpp/core/ConfigurationTests.cpp
@@ -1,5 +1,5 @@
/*********************************************************************/
/* Copyright (c) 2013, EPFL/Blue Brain Project */
/* Copyright (c) 2014-2016, EPFL/Blue Brain Project */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* */
Expand Down Expand Up @@ -54,7 +54,7 @@ namespace ut = boost::unit_test;

#define CONFIG_EXPECTED_BACKGROUND "/nfs4/bbp.epfl.ch/visualization/DisplayWall/media/background.png"
#define CONFIG_EXPECTED_BACKGROUND_COLOR "#242424"
#define CONFIG_EXPECTED_DOCK_DIR "/nfs4/bbp.epfl.ch/visualization/DisplayWall/media"
#define CONFIG_EXPECTED_CONTENT_DIR "/nfs4/bbp.epfl.ch/visualization/DisplayWall/media"
#define CONFIG_EXPECTED_SESSIONS_DIR "/nfs4/bbp.epfl.ch/visualization/DisplayWall/sessions"
#define CONFIG_EXPECTED_LAUNCHER_DISPLAY ":0"
#define CONFIG_EXPECTED_DEMO_SERVICE_URL "https://visualization-dev.humanbrainproject.eu/viz/rendering-resource-manager/v1"
Expand Down Expand Up @@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE( test_master_configuration )
{
MasterConfiguration config( CONFIG_TEST_FILENAME );

BOOST_CHECK_EQUAL( config.getDockStartDir().toStdString(), CONFIG_EXPECTED_DOCK_DIR );
BOOST_CHECK_EQUAL( config.getContentDir().toStdString(), CONFIG_EXPECTED_CONTENT_DIR );
BOOST_CHECK_EQUAL( config.getSessionsDir().toStdString(), CONFIG_EXPECTED_SESSIONS_DIR );

BOOST_CHECK_EQUAL( config.getLauncherDisplay().toStdString(), CONFIG_EXPECTED_LAUNCHER_DISPLAY );
Expand All @@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE( test_master_configuration_default_values )
{
MasterConfiguration config( CONFIG_TEST_FILENAME_II );

BOOST_CHECK_EQUAL( config.getDockStartDir().toStdString(), QDir::homePath().toStdString() );
BOOST_CHECK_EQUAL( config.getContentDir().toStdString(), QDir::homePath().toStdString() );
BOOST_CHECK_EQUAL( config.getSessionsDir().toStdString(), QDir::homePath().toStdString() );
BOOST_CHECK_EQUAL( config.getWebServicePort(), CONFIG_EXPECTED_DEFAULT_WEBSERVICE_PORT );
BOOST_CHECK_EQUAL( config.getWebBrowserDefaultURL().toStdString(), CONFIG_EXPECTED_DEFAULT_URL );
Expand Down
86 changes: 0 additions & 86 deletions tests/cpp/core/DockToolbarTests.cpp

This file was deleted.

23 changes: 1 addition & 22 deletions tests/cpp/core/LocalPixelStreamerTests.cpp
@@ -1,5 +1,5 @@
/*********************************************************************/
/* Copyright (c) 2013, EPFL/Blue Brain Project */
/* Copyright (c) 2014-2016, EPFL/Blue Brain Project */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* */
Expand Down Expand Up @@ -48,7 +48,6 @@ namespace ut = boost::unit_test;
#ifdef TIDE_USE_QT5WEBKITWIDGETS
# include "localstreamer/WebkitPixelStreamer.h"
#endif
#include "localstreamer/DockPixelStreamer.h"

#include "GlobalQtApp.h"

Expand All @@ -60,14 +59,12 @@ BOOST_AUTO_TEST_CASE( test_local_pixel_streamer_type )
#ifdef TIDE_USE_QT5WEBKITWIDGETS
BOOST_CHECK_EQUAL( getStreamerTypeString(PS_WEBKIT).toStdString(), "webkit" );
#endif
BOOST_CHECK_EQUAL( getStreamerTypeString(PS_DOCK).toStdString(), "dock" );

BOOST_CHECK_EQUAL( getStreamerType(""), PS_UNKNOWN );
BOOST_CHECK_EQUAL( getStreamerType("zorglump"), PS_UNKNOWN );
#ifdef TIDE_USE_QT5WEBKITWIDGETS
BOOST_CHECK_EQUAL( getStreamerType("webkit"), PS_WEBKIT );
#endif
BOOST_CHECK_EQUAL( getStreamerType("dock"), PS_DOCK );
}

BOOST_AUTO_TEST_CASE( test_local_pixel_streamer_factory_unknown_type )
Expand Down Expand Up @@ -95,21 +92,3 @@ BOOST_AUTO_TEST_CASE( test_local_pixel_streamer_factory_webkit_type )
delete streamer;
}
#endif

BOOST_AUTO_TEST_CASE( test_local_pixel_streamer_factory_dock_type )
{
if( !hasGLXDisplay( ))
return;

CommandLineOptions options;
options.setPixelStreamerType(PS_DOCK);
PixelStreamer* streamer = PixelStreamerFactory::create( options );

BOOST_CHECK( streamer );

DockPixelStreamer* dock = dynamic_cast<DockPixelStreamer*>(streamer);
BOOST_CHECK( dock );

delete streamer;
}

5 changes: 3 additions & 2 deletions tests/cpp/core/PixelStreamWindowManagerTests.cpp
@@ -1,6 +1,7 @@
/*********************************************************************/
/* Copyright (c) 2014-2015, EPFL/Blue Brain Project */
/* Copyright (c) 2014-2016, EPFL/Blue Brain Project */
/* Daniel Nachbaur <daniel.nachbaur@epfl.ch> */
/* Raphael Dumusc <raphael.dumusc@epfl.ch> */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
Expand Down Expand Up @@ -56,7 +57,7 @@ BOOST_GLOBAL_FIXTURE( MinimalGlobalQtApp );
namespace
{
const QString CONTENT_URI( "bla" );
const QString PANEL_URI( "Dock" );
const QString PANEL_URI( "Launcher" );
const QSize wallSize( 1000, 1000 );
const QSize defaultPixelStreamWindowSize( 640, 480 );
const QSize testWindowSize( 500, 400 );
Expand Down
100 changes: 0 additions & 100 deletions tests/cpp/core/QmlControlPanelTests.cpp

This file was deleted.

4 changes: 1 addition & 3 deletions tide/core/CMakeLists.txt
@@ -1,5 +1,5 @@

# Copyright (c) 2013-2015, EPFL/Blue Brain Project
# Copyright (c) 2013-2016, EPFL/Blue Brain Project
# Raphael Dumusc <raphael.dumusc@epfl.ch>

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
Expand Down Expand Up @@ -69,7 +69,6 @@ list(APPEND TIDECORE_PUBLIC_HEADERS
Options.h
PixelStreamContent.h
PixelStreamInteractionDelegate.h
QmlControlPanel.h
QmlTypeRegistration.h
QtImage.h
StatePreview.h
Expand Down Expand Up @@ -128,7 +127,6 @@ list(APPEND TIDECORE_SOURCES
Options.cpp
PixelStreamContent.cpp
PixelStreamInteractionDelegate.cpp
QmlControlPanel.cpp
QtImage.cpp
StatePreview.cpp
SVGContent.cpp
Expand Down
2 changes: 1 addition & 1 deletion tide/core/Options.cpp
Expand Up @@ -53,7 +53,7 @@ Options::Options()
, showZoomContext_(true)
, showContentTiles_(false)
, showStreamingStatistics_(false)
, showControlArea_(false)
, showControlArea_(true)
, alphaBlendingEnabled_(false)
{
}
Expand Down
4 changes: 2 additions & 2 deletions tide/core/PDFInteractionDelegate.cpp
Expand Up @@ -52,12 +52,12 @@ PDFInteractionDelegate::PDFInteractionDelegate( ContentWindow& contentWindow )

void PDFInteractionDelegate::swipeLeft()
{
_getPDFContent().previousPage();
_getPDFContent().nextPage();
}

void PDFInteractionDelegate::swipeRight()
{
_getPDFContent().nextPage();
_getPDFContent().previousPage();
}

PDFContent& PDFInteractionDelegate::_getPDFContent()
Expand Down
2 changes: 1 addition & 1 deletion tide/core/PixelStreamContent.cpp
Expand Up @@ -62,5 +62,5 @@ bool PixelStreamContent::readMetadata()

bool PixelStreamContent::hasFixedAspectRatio() const
{
return _uri == "dock";
return false;
}

0 comments on commit 0942671

Please sign in to comment.