Skip to content

Commit

Permalink
Unifying UI of Whiteboard with Launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodhajski committed Oct 31, 2016
1 parent d81a2f2 commit ac1be94
Show file tree
Hide file tree
Showing 16 changed files with 238 additions and 214 deletions.
1 change: 0 additions & 1 deletion apps/Launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Raphael Dumusc <raphael.dumusc@epfl.ch>

set(TIDELAUNCHER_HEADERS
FileInfoHelper.h
Launcher.h
)

Expand Down
60 changes: 0 additions & 60 deletions apps/Launcher/FileInfoHelper.h

This file was deleted.

2 changes: 1 addition & 1 deletion apps/Launcher/Launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#ifndef LAUNCHER_H
#define LAUNCHER_H

#include "FileInfoHelper.h"
#include "tide/master/FileInfoHelper.h"

#include <deflect/qt/QmlStreamer.h>

Expand Down
5 changes: 5 additions & 0 deletions apps/Whiteboard/Whiteboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include "tide/master/localstreamer/QmlKeyInjector.h"
#include "tide/master/MasterConfiguration.h"

#include <QQmlContext>

namespace
{
const std::string deflectHost( "localhost" );
Expand All @@ -66,6 +68,9 @@ Whiteboard::Whiteboard( int& argc, char* argv[] )
auto item = _qmlStreamer->getRootItem();
item->setProperty( "saveURL", config.getWhiteboardSaveFolder() );

QQmlEngine* engine = _qmlStreamer->getQmlEngine();
engine->rootContext()->setContextProperty( "fileInfo", &_fileInfoHelper );

}

bool Whiteboard::event( QEvent* event_ )
Expand Down
3 changes: 2 additions & 1 deletion apps/Whiteboard/Whiteboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#ifndef WHITEBOARD_H
#define WHITEBOARD_H

#include <memory>
#include "tide/master/FileInfoHelper.h"

#include <QGuiApplication>
#include <deflect/qt/QmlStreamer.h>
Expand All @@ -59,6 +59,7 @@ class Whiteboard : public QGuiApplication
std::unique_ptr<deflect::qt::QmlStreamer> _qmlStreamer;

bool event( QEvent* event ) final;
FileInfoHelper _fileInfoHelper;
};

#endif
2 changes: 2 additions & 0 deletions apps/Whiteboard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ int main( int argc, char** argv )
{
logger_id = "whiteboard";
qInstallMessageHandler( qtMessageLogger );
// Load virtualkeyboard input context plugin
qputenv( "QT_IM_MODULE", QByteArray( "virtualkeyboard" ));

std::unique_ptr<Whiteboard> whiteboard;
try
Expand Down
Loading

0 comments on commit ac1be94

Please sign in to comment.