Conversation
| BOOST_CHECK_EQUAL( controller.getMinSizeAspectRatioCorrect(), | ||
| QSize( 400, 300 )); | ||
|
|
||
| controller.resize( minSize, CENTER ); |
There was a problem hiding this comment.
all those resize operations are not really expected to have an effect on the minSize. I would rather make some more checks in FULLSCREEN with sizeHints.
| typedef boost::shared_ptr< Markers > MarkersPtr; | ||
| typedef boost::shared_ptr< MPIChannel > MPIChannelPtr; | ||
| typedef boost::shared_ptr< Options > OptionsPtr; | ||
| typedef boost::shared_ptr< MasterConfiguration > MasterConfigurationPtr; |
| class DataProvider; | ||
| class DataSource; | ||
| class DisplayGroup; | ||
| class DisplayGroupController; |
There was a problem hiding this comment.
either forward-declare here OR #include "control/DisplayGroupController.h" in RestController.h, not both.
| _restInterface.get()->exposeStatistics( *(_logger.get()) ); | ||
|
|
||
| _restInterface.get()->setController( *(_displayGroup.get()), | ||
| *(_config.get()) ); |
There was a problem hiding this comment.
*(mySmartPtr.get()) can be just *mySmartPtr (3 occurences)
| QSizeF ContentWindowController::getMinSizeAspectRatioCorrect() const | ||
| { | ||
| const qreal contentAspectRatio = _contentWindow.getContent()-> | ||
| getAspectRatio(); |
There was a problem hiding this comment.
style: don't break at ->, break after = if it can't fit on one line
| void RestWindows::registerThumbnailUrl( ContentWindowPtr contentWindow ) | ||
| { | ||
| QString url = "tide/windows/" + contentWindow.get()->getID().toString() | ||
| .replace(_regex,"")+"/thumbnail"; |
There was a problem hiding this comment.
rewrite this line (no break in the middle, const, etc..)
| QString uri = contentWindow.get()->getContent().get()->getURI(); | ||
| httpServer.get().handleGET(url.toStdString(), [uri] () | ||
| { | ||
| QSize size(768,768); |
There was a problem hiding this comment.
magic number: it must be declared as a constant in the namespace{} at the beginnig of the file
| buffer.open(QIODevice::WriteOnly); | ||
| image.save(&buffer, "PNG"); | ||
| QString str = imageArray.toBase64(); | ||
| return str.toStdString(); |
There was a problem hiding this comment.
more compact:
return imageArray.toBase64().toStdString();
| if( obj.empty( )) | ||
| return false; | ||
|
|
||
| const auto windowSize = QSizeF( obj["w"].toString().toDouble(), |
There was a problem hiding this comment.
QJsonValue can be directly converted to a double or an int, why make it a string first? Replace all occurences in this file
| if( obj.empty( )) | ||
| return false; | ||
|
|
||
| const auto windowPos = QPointF( obj["x"].toString().toDouble(), |
There was a problem hiding this comment.
move the windowPos declaration below the check for if( !window ), there is no need to evaluate it if there is no window (also in the previous function).
744ca2d to
7efe185
Compare
| } | ||
|
|
||
| button:active { | ||
| position:relative; |
There was a problem hiding this comment.
this is a visual effect when you click on a button
| return closeButton; | ||
| } | ||
|
|
||
| function createFocusButton(tile) { |
There was a problem hiding this comment.
try to reorder in the same way as createCloseButton; if possible extract a common createButton() part, because they look very similar
| curtain.css("width", wallWidth).css("height", wallHeight); | ||
| curtain.addClass("curtain"); | ||
| if (type === "fs") { | ||
| curtain.css("z-index", 51); |
| var scaleV = (viewportWidth - minimalHorizontalMargin ) / wallWidth; | ||
| var scaleH = (viewportHeight - minimalVerticalMargin ) / wallHeight; | ||
|
|
||
| zoomScale = (scaleV < scaleH) ? scaleV : scaleH; |
There was a problem hiding this comment.
unless we have a vertical wall
| var wallMargin = (window.innerWidth - (wallWidth * zoomScale)) / 2; | ||
|
|
||
| $("#wall").css({transform: 'scale(' + zoomScale + ')'}).css("margin-left", wallMargin).css | ||
| ("margin-right", wallMargin).css("margin-top", 25).css("margin-bottom", minimalVerticalMargin); |
There was a problem hiding this comment.
split in multiple lines for readability
| bool _handleExitFullScreen(); | ||
| bool _handleFocusWindows(); | ||
| bool _handleMoveWindow( const std::string& string ); | ||
| bool _handleMoveWindowToFront( const QString id ); |
| bool _handleDeselectWindows(); | ||
| bool _handleExitFullScreen(); | ||
| bool _handleFocusWindows(); | ||
| bool _handleMoveWindow( const std::string& string ); |
There was a problem hiding this comment.
rename all "string" variables to "json" or something similar
| bool _handleMoveWindowToFront( const QString id ); | ||
| bool _handleMoveWindowToFullscreen( QString id ); | ||
| bool _handleResizeWindow( const std::string& string ); | ||
| bool _handleUnfocusWindow( const QString& string ); |
| QJsonArray arr; | ||
| for( const auto& contentWindow : windows ) | ||
| { | ||
| if (contentWindow.get()->getContent().get()->getURI() == "Launcher") |
| { | ||
| public: | ||
| /** | ||
| * Construct dynamic content used by REST interface. |
There was a problem hiding this comment.
dynamic content -> a JSON list of windows ?
e6ba727 to
314f6ad
Compare
| window.get()->setSelected( false ); | ||
| window.get()->setSelected( true ); | ||
| else | ||
| window.get()->setSelected( false ); |
There was a problem hiding this comment.
just: window->setSelected( !window->isSelected( ));
| fullscreenButton.className = "windowControl"; | ||
| fullscreenButton.style.visibility = tile.mode === 2 ? "hidden" : "visible"; | ||
| var icon = fullscreenIcon.cloneNode(true); | ||
| function setIcon(type) { |
There was a problem hiding this comment.
nice, but should be named createIcon(type)
Web interface using rest interface to control the application and display its state