From b19069547464c609e1e6a47d6f889965108605e2 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 8 Jun 2015 01:08:58 +0200 Subject: [PATCH] Add initial version of launcher --- apps/Launcher/CMakeLists.txt | 66 +++++ apps/Launcher/files.qrc | 5 + apps/Launcher/images/header.png | Bin 0 -> 13192 bytes apps/Launcher/informationwidget.cpp | 29 +++ apps/Launcher/informationwidget.h | 36 +++ apps/Launcher/main.cpp | 155 ++++++++++++ apps/Launcher/mainwindow.cpp | 377 ++++++++++++++++++++++++++++ apps/Launcher/mainwindow.h | 82 ++++++ apps/Launcher/shortcutwidget.cpp | 29 +++ apps/Launcher/shortcutwidget.h | 36 +++ apps/Launcher/syncwidget.cpp | 25 ++ apps/Launcher/syncwidget.h | 34 +++ 12 files changed, 874 insertions(+) create mode 100644 apps/Launcher/CMakeLists.txt create mode 100644 apps/Launcher/files.qrc create mode 100644 apps/Launcher/images/header.png create mode 100644 apps/Launcher/informationwidget.cpp create mode 100644 apps/Launcher/informationwidget.h create mode 100644 apps/Launcher/main.cpp create mode 100644 apps/Launcher/mainwindow.cpp create mode 100644 apps/Launcher/mainwindow.h create mode 100644 apps/Launcher/shortcutwidget.cpp create mode 100644 apps/Launcher/shortcutwidget.h create mode 100644 apps/Launcher/syncwidget.cpp create mode 100644 apps/Launcher/syncwidget.h diff --git a/apps/Launcher/CMakeLists.txt b/apps/Launcher/CMakeLists.txt new file mode 100644 index 0000000000..f0c902e10d --- /dev/null +++ b/apps/Launcher/CMakeLists.txt @@ -0,0 +1,66 @@ +######################################################################################### +# # +# OpenSpace # +# # +# Copyright (c) 2014-2015 # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of this # +# software and associated documentation files (the "Software"), to deal in the Software # +# without restriction, including without limitation the rights to use, copy, modify, # +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the following # +# conditions: # +# # +# The above copyright notice and this permission notice shall be included in all copies # +# or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +######################################################################################### + +set(APPLICATION_NAME Launcher) +set(APPLICATION_LINK_TO_OPENSPACE ON) + +set(SOURCE_FILES + ${OPENSPACE_APPS_DIR}/Launcher/main.cpp + ${OPENSPACE_APPS_DIR}/Launcher/informationwidget.cpp + ${OPENSPACE_APPS_DIR}/Launcher/mainwindow.cpp + ${OPENSPACE_APPS_DIR}/Launcher/shortcutwidget.cpp + ${OPENSPACE_APPS_DIR}/Launcher/syncwidget.cpp +) + +set(HEADER_FILES + ${OPENSPACE_APPS_DIR}/Launcher/informationwidget.h + ${OPENSPACE_APPS_DIR}/Launcher/mainwindow.h + ${OPENSPACE_APPS_DIR}/Launcher/shortcutwidget.h + ${OPENSPACE_APPS_DIR}/Launcher/syncwidget.h +) + +find_package(Qt5Widgets) +find_package(Qt5Network) + +qt5_wrap_cpp(MOC_FILES ${HEADER_FILES}) +qt5_add_resources(RESOURCE_FILES ${OPENSPACE_APPS_DIR}/Launcher/files.qrc) + +add_executable(${APPLICATION_NAME} MACOSX_BUNDLE + ${SOURCE_FILES} + ${HEADER_FILES} + ${MOC_FILES} + ${RESOURCE_FILES} +) + +target_link_libraries(${APPLICATION_NAME} + Qt5::Widgets + Qt5::Network +) + +if (APPLE) +INSTALL(CODE " + include(BundleUtilities) + fixup_bundle(\"/Users/alex/Development/OpenSpace/bin/openspace/Debug/Launcher.app/Contents/MacOS/Launcher\" \"/Users/alex/Development/OpenSpace/bin/openspace/Debug/TimelineView.app/Contents/plugins/platforms/libqcocoa.dylib\" \"\") + " COMPONENT Runtime) +endif () diff --git a/apps/Launcher/files.qrc b/apps/Launcher/files.qrc new file mode 100644 index 0000000000..5661c6a39f --- /dev/null +++ b/apps/Launcher/files.qrc @@ -0,0 +1,5 @@ + + + images/header.png + + diff --git a/apps/Launcher/images/header.png b/apps/Launcher/images/header.png new file mode 100644 index 0000000000000000000000000000000000000000..21ced755c89b5a0a44e690bfb1850408da984cf8 GIT binary patch literal 13192 zcmeHtWmH^S(pwX5pvUC&e1gsCV=qaYC=K|w*G$jV5lK|#T?1NZTW2*5S_3&aQt z3SY=tTwFy~T%1hB+2M`#TMH;CtH6VF4;5_X)+2B3&#hhE%zTzQ&PwqdK|dM!wld?W zFeTxzza!Bh29eRrio#*T#!F&6M-YX>fz73Gp2^wjIBNbeRdIL3lv7suc&N^?+`cGq z<}0iY8xR`it)qh;2_@<%qw%gVkh`%xn3Bf}dJT$!42oX#=nw=dvaq*@d0d=JgC9Hc z)4RXYfjl@t`f|@sqtD@>*o(JSs$@n@!bx(i3`eU&>7Yyy!+%9YA>CEHf0>Rgrb{MC zdRyTO*7ksp;@{g`*nEJTQ3&jfdxI#3Bss<$rdPEkpSP<$98I6BfvMjWfxRrmRW`mX#5CO3@DT3YWOq4!E|dVZFy}Qd46cQSOmDFKaTeBzEw!hOFG!+qbomWvj@Gj)`jwe&^{`h zecR7TBcmzu-|FUpR;kRV@`Yr%EJEkru|f4HLq<+~3mI$B13GB4$1&LaojV)x$e?k@ zU@%RfGXr93y`0Eku>L4(fz`hM6u6`zlPLTH@6dkz-{<&yg?27`pQgN@?=jPA( zMD1f)uwf*{WyhT8(CC8(J`$8*v>>>Nd*nVFqvCwl{%+>u=olJ4(T9*Y6CzfzR4Rq% zMeqVIK7Zi*>SOw&8cqjcAG;h|3)%LATi0P1$(QV|WK+UwJKlhewMa*jCSHT*m9RX) z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C8 zC`}T{CA{{{&D`gzO`X4@@bs5ye(G^eS1b6E!w&|^Eljos>&aexx!M!!rR_*~;SOf+ zi(P7C--{$55g4G72!f?-U9OZ5TC1sbb6WVfuIGxX9|qllEFfA0KcQrPdAOV*qj4Uk zsxr<)0n|?~^nOY#18;7#kJMj5Kuc(IV@BUW(OV>K}6t=YqIyNpGGU+$qD<3@7 zmfJB=k_oB2wCoEW{O%WvO}T2CrzCYzif*?*LPvylaPf>&Iv;O8mFqVu@w@F}&jD45 zi1A^|US*d>gZ3>iU=Ph=AI1rJfT$1LgmAq=sZ;R!do2g)fk-|eaGE4u-Mqkukb(az}@n?Q_U&dR-;1Rx#s!uI6Q7KH2UA+-3yY&RsxGl2} z9RPz#&#`E(#}ei2<~sd5x7{#rb8P81D;ihg(>N>#!mw!7bhF$TF~``-&E`Y$Tp~u; z_-C(m%I;b+xonf$fGlm~XSTcXwC{aWnT$`9+YT(Mf;yUWBzvu{8V z{bEmNhAk`1RxZyb&Is$T<%N@3tK=U{Oc&~`C#sA^=Ig8zv>Al~zZ<@P5|cIqI(M>x zbu5=vb2dVoAN?VZ&Vx*i{T3;PG{ge#3QIG*+b=h88l%=7e09=g5gr*xVklJ35f0111=teDGMIA`M#EW;@A-p5m;4yD1_Wp_6xaTjmon&7N>5dJoRG&UOU4Qt{pSbbwiZLv09Y8}&;0ef(eX5PEf^?w(As4P z|GQy5$0CsCdAN-^3NiP{YU{3!w-@lsZ?{LWCo-_14CF=iJ ziT<=3&CiMc)w1qJitT@wWG3(*0|Awx3V=E6Ua0@-rJDjI<^TFHu0f!RKcwL$&JXrI Q{lq0JsU%VP$|UH20s7Q2NdN!< literal 0 HcmV?d00001 diff --git a/apps/Launcher/informationwidget.cpp b/apps/Launcher/informationwidget.cpp new file mode 100644 index 0000000000..50769447ec --- /dev/null +++ b/apps/Launcher/informationwidget.cpp @@ -0,0 +1,29 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include "informationwidget.h" + +InformationWidget::InformationWidget(QWidget* parent) + : QTextEdit(parent) +{} diff --git a/apps/Launcher/informationwidget.h b/apps/Launcher/informationwidget.h new file mode 100644 index 0000000000..21565322ea --- /dev/null +++ b/apps/Launcher/informationwidget.h @@ -0,0 +1,36 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __INFORMATIONWIDGET_H__ +#define __INFORMATIONWIDGET_H__ + +#include + +class InformationWidget : public QTextEdit { +Q_OBJECT +public: + InformationWidget(QWidget* parent); +}; + +#endif // __INFORMATIONWIDGET_H__ diff --git a/apps/Launcher/main.cpp b/apps/Launcher/main.cpp new file mode 100644 index 0000000000..b4c17f6d04 --- /dev/null +++ b/apps/Launcher/main.cpp @@ -0,0 +1,155 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include + +#include "mainwindow.h" + +//static const QString style = R"style( +//QWidget { +// background-color: rgb(80, 80, 80); +// font-family: Helvetica; +//} +// +//QGroupBox { +// background-color: qlineargradient( +// x1: 0, y1: 0, x2: 0, y2: 1, +// stop: 0 #858585, +// stop: 1 #959595); +// border: 2px solid gray; +// border-radius: 5px; +// margin-top: 4ex; +// font-size: bold 12px; +//} +// +//QGroupBox::title { +// background-color: #E0E0E0; +// border: 2px solid gray; +// border-radius: 5px; +// subcontrol-origin: margin; +// subcontrol-position: top center; +// padding: 0 10px; +//} +// +//QLineEdit { +// color: lightgray; +//} +// +//QSlider::groove:horizontal { +// border: 1px solid #999999; +// height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ +// background: qlineargradient( +// x1:0, y1:0, x2:1, y2:0, +// stop:0 #c4c4c4, +// stop:0.5 #555555, +// stop:1 #c4c4c4 +// ); +// margin: 2px 0; +//} +// +//QSlider::handle:horizontal { +// background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); +// border: 1px solid #5c5c5c; +// width: 18px; +// margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */ +// border-radius: 3px; +//} +// +//QPushButton { +// background-color: lightgray; +// border-style: outset; +// border-width: 0.5px; +// border-radius: 5px; +// border-color: black; +// font: bold 12px; +// min-width: 10em; +//} +// +//QPushButton#connection { +// background-color: lightgreen; +//} +// +//QPushButton#connection:pressed { +// background-color: green; +//} +// +// +//QPushButton#pause, QPushButton#play { +// padding: 5px; +//} +// +//QPushButton#pause:pressed, QPushButton#play:pressed, QPushButton:pressed { +// background-color: darkgray; +// border-style: inset; +//} +// +//QCombobox { +// border: 1px solid gray; +// border-radius: 3px; +// padding: 1px 18px 1px 3px; +// min-width: 6em; +//} +// +//QComboBox:editable { +// background: lightgrey; +//} +// +//QComboBox QAbstractItemView { +// border: 2px solid darkgray; +// border-radius: 5px; +// background-color: #a8a8a8; +// selection-background-color: #a8a8a8; +//} +// +//QLabel#label { +// font-size: 13px; +// background-color: transparent; +// font-variant: small-caps; +//} +// +//QLabel#value { +// font-family: monospace; +// font-weight: bold; +// font-size: 14px; +// background-color: transparent; +//} +// +//QWidget#background { +// background-color: transparent; +//} +// +//QTextEdit { +// font-family: monospace; +//} +//)style"; + +int main(int argc, char** argv) { + QApplication app(argc, argv); + +// app.setStyleSheet(style); + MainWindow window; + window.show(); + + return app.exec(); +} diff --git a/apps/Launcher/mainwindow.cpp b/apps/Launcher/mainwindow.cpp new file mode 100644 index 0000000000..70b8624581 --- /dev/null +++ b/apps/Launcher/mainwindow.cpp @@ -0,0 +1,377 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include "mainwindow.h" + +#include "informationwidget.h" + +#include +#include +#include +#include +#include +#include + +namespace { + const QSize WindowSize = QSize(640, 480); +} + +MainWindow::MainWindow() + : QWidget(nullptr) + , _informationWidget(nullptr) +{ + setFixedSize(WindowSize); + + QGridLayout* layout = new QGridLayout; + + QLabel* image = new QLabel; + QPixmap p = QPixmap(":/images/header.png"); + image->setPixmap(p.scaledToWidth(WindowSize.width())); + layout->addWidget(image, 0, 0, 1, 2); + + _informationWidget = new InformationWidget(this); + layout->addWidget(_informationWidget, 1, 0, 2, 1); + + QWidget* container = new QWidget; + { + QGridLayout* layout = new QGridLayout; + + QLabel* shortcutLabel = new QLabel("Keyboard Shortcuts:"); + layout->addWidget(shortcutLabel, 0, 0); + QPushButton* shortcutButton = new QPushButton("Open..."); + QObject::connect(shortcutButton, SIGNAL(clicked(bool)), + this, SLOT(shortcutButtonPressed()) + ); + layout->addWidget(shortcutButton, 0, 1); + + QLabel* sceneSelectionLabel = new QLabel("Scenes:"); + layout->addWidget(sceneSelectionLabel, 1, 0); + QComboBox* sceneSelection = new QComboBox; + layout->addWidget(sceneSelection); + + container->setLayout(layout); + } + layout->addWidget(container, 1, 1); + + container = new QWidget; + { + QBoxLayout* layout = new QHBoxLayout; + + QPushButton* cancelButton = new QPushButton("Cancel"); + layout->addWidget(cancelButton); + + QPushButton* syncButton = new QPushButton("Sync"); + layout->addWidget(syncButton); + + QPushButton* startButton = new QPushButton("Start"); + layout->addWidget(startButton); + + container->setLayout(layout); + } + layout->addWidget(container, 2, 1); + + setLayout(layout); +} + +MainWindow::~MainWindow() { + delete _informationWidget; +} + +void MainWindow::shortcutButtonPressed() { + +} + +//MainWindow::MainWindow() +// : QWidget(nullptr) +// , _configurationWidget(nullptr) +// , _timeControlWidget(nullptr) +// , _informationWidget(nullptr) +// , _timelineWidget(nullptr) +// , _socket(nullptr) +//{ +// setWindowTitle("OpenSpace Timeline"); +// +// _configurationWidget = new ConfigurationWidget(this); +// _configurationWidget->setMinimumWidth(350); +// _timeControlWidget = new ControlWidget(this); +// _timeControlWidget->setMinimumWidth(350); +// _informationWidget = new InformationWidget(this); +// _informationWidget->setMinimumWidth(350); +// _timelineWidget = new TimelineWidget(this); +// +// QGridLayout* layout = new QGridLayout; +// layout->addWidget(_configurationWidget, 0, 0); +// layout->addWidget(_timeControlWidget, 1, 0); +// layout->addWidget(_informationWidget, 2, 0); +// layout->addWidget(_timelineWidget, 0, 1, 3, 1); +// +// layout->setColumnStretch(1, 5); +// +// +// QObject::connect( +// _configurationWidget, SIGNAL(connect(QString, QString)), +// this, SLOT(onConnect(QString, QString)) +// ); +// QObject::connect( +// _configurationWidget, SIGNAL(disconnect()), +// this, SLOT(onDisconnect()) +// ); +// +// QObject::connect( +// _timeControlWidget, SIGNAL(scriptActivity(QString)), +// this, SLOT(sendScript(QString)) +// ); +// +// setLayout(layout); +// +// _configurationWidget->socketDisconnected(); +// _timeControlWidget->socketDisconnected(); +// _informationWidget->socketDisconnected(); +// _timelineWidget->socketDisconnected(); +//} +// +//MainWindow::~MainWindow() { +// delete _socket; +//} +// +//void MainWindow::onConnect(QString host, QString port) { +// delete _socket; +// +// _socket = new QTcpSocket(this); +// QObject::connect(_socket, SIGNAL(readyRead()), SLOT(readTcpData())); +// QObject::connect(_socket, SIGNAL(connected()), SLOT(onSocketConnected())); +// QObject::connect(_socket, SIGNAL(disconnected()), SLOT(onSocketDisconnected())); +// +// _socket->connectToHost(host, port.toUInt()); +//} +// +//void MainWindow::onDisconnect() { +// delete _socket; +// _socket = nullptr; +//} +// +//void MainWindow::readTcpData() { +// static const uint16_t MessageTypeStatus = 0; +// static const uint16_t MessageTypePlayBookHongKang = 2; +// static const uint16_t MessageTypePlayBookLabel = 3; +// +// QByteArray data = _socket->readAll(); +// +// if (QString(data) == "Connected to SGCT!\r\n") +// return; +// if (QString(data) == "OK\r\n") +// return; +// +// QByteArray messageTypeData = data.left(2); +// union { +// uint16_t value; +// std::array data; +// } messageType; +// std::memcpy(messageType.data.data(), messageTypeData.data(), sizeof(uint16_t)); +// +// switch (messageType.value) { +// case MessageTypeStatus: +// break; +// case MessageTypePlayBookHongKang: +// qDebug() << "Hong Kang Playbook received"; +// break; +// case MessageTypePlayBookLabel: +// qDebug() << "Label Playbook received"; +// break; +// default: +// qDebug() << "Unknown message of type '" << messageType.value << "'"; +// } +// +// switch (messageType.value) { +// case MessageTypeStatus: +// { +// if (_hasHongKangTimeline && _hasLabelTimeline) +// handleStatusMessage(data.mid(2)); +// break; +// } +// case MessageTypePlayBookHongKang: +// case MessageTypePlayBookLabel: +// { +// const char* payloadDebug = data.mid(2).data(); +// +// size_t beginning = 0; +// uint32_t size = readFromBuffer(data.mid(2).data(), beginning); +// +// //qDebug() << "Begin reading data"; +// while (_socket->waitForReadyRead() && data.size() < int(size)) { +// //qDebug() << "."; +// data = data.append(_socket->readAll()); +// //data = data.append(_socket->read(int(size) - data.size())); +// QThread::msleep(50); +// } +// //qDebug() << "Finished reading data. Handling playbook"; +// +// handlePlaybook(data.mid(2)); +// +// //qDebug() << "Finished handling playbook"; +// +// if (messageType.value == MessageTypePlayBookHongKang) +// _hasHongKangTimeline = true; +// if (messageType.value == MessageTypePlayBookLabel) +// _hasLabelTimeline = true; +// +// if (_hasHongKangTimeline && _hasLabelTimeline) { +// fullyConnected(); +// } +// +// break; +// } +// default: +// qDebug() << QString(data); +// } +// +//} +// +//void MainWindow::handleStatusMessage(QByteArray data) { +// const char* buffer = data.data(); +// +// union { +// double value; +// std::array buffer; +// } et; +// std::memmove(et.buffer.data(), buffer, sizeof(double)); +// +// std::vector timeString(24); +// std::memmove(timeString.data(), buffer + sizeof(double), 24); +// +// union { +// double value; +// std::array buffer; +// } delta; +// std::memmove(delta.buffer.data(), buffer + sizeof(double) + 24, sizeof(double)); +// +// _timeControlWidget->update( +// QString::fromStdString(std::string(timeString.begin(), timeString.end())), +// QString::number(delta.value) +// ); +// _timelineWidget->setCurrentTime(std::string(timeString.begin(), timeString.end()), et.value); +//} +// +//std::vector instrumentsFromId(uint16_t instrumentId, std::map instrumentMap) { +// std::vector results; +// for (int i = 0; i < 16; ++i) { +// uint16_t testValue = 1 << i; +// if ((testValue & instrumentId) != 0) { +// std::string t = instrumentMap.at(testValue); +// if (t.empty()) +// qDebug() << "Empty instrument"; +// results.push_back(t); +// } +// } +// return results; +//} +// +//void MainWindow::handlePlaybook(QByteArray data) { +// char* buffer = data.data(); +// size_t currentReadLocation = 0; +// +// uint32_t totalData = readFromBuffer(buffer, currentReadLocation); +// +// uint8_t nTargets = readFromBuffer(buffer, currentReadLocation); +// qDebug() << "Targets: " << nTargets; +// std::map targetMap; +// for (uint8_t i = 0; i < nTargets; ++i) { +// uint8_t id = readFromBuffer(buffer, currentReadLocation); +// std::string value = readFromBuffer(buffer, currentReadLocation); +// qDebug() << QString::fromStdString(value); +// targetMap[id] = value; +// } +// +// uint8_t nInstruments = readFromBuffer(buffer, currentReadLocation); +// qDebug() << "Instruments: " << nInstruments; +// std::map instrumentMap; +// for (uint8_t i = 0; i < nInstruments; ++i) { +// uint16_t id = readFromBuffer(buffer, currentReadLocation); +// std::string value = readFromBuffer(buffer, currentReadLocation); +// qDebug() << QString::fromStdString(value); +// instrumentMap[id] = value; +// } +// +// uint32_t nImages = readFromBuffer(buffer, currentReadLocation); +// std::vector images; +// for (uint32_t i = 0; i < nImages; ++i) { +// Image image; +// image.beginning = readFromBuffer(buffer, currentReadLocation); +// image.ending = readFromBuffer(buffer, currentReadLocation); +// +// image.beginningString = readFromBuffer(buffer, currentReadLocation); +// image.endingString = readFromBuffer(buffer, currentReadLocation); +// +// uint8_t targetId = readFromBuffer(buffer, currentReadLocation); +// uint16_t instrumentId = readFromBuffer(buffer, currentReadLocation); +// image.target = targetMap[targetId]; +// image.instruments = instrumentsFromId(instrumentId, instrumentMap); +// if (image.instruments.empty()) +// qDebug() << "Instruments were empty"; +// images.push_back(image); +// } +// +// _timelineWidget->setData(std::move(images), std::move(targetMap), std::move(instrumentMap)); +// +//} +// +//void MainWindow::sendScript(QString script) { +// if (_socket) { +// _socket->write(("0" + script + "\r\n").toLatin1()); +// //QByteArray data = (QString("0") + script).toLocal8Bit(); +// //qDebug() << data; +// //_socket->write(data); +// //QThread::msleep(25); +// } +// //_socket->write(("0" + script + "\r\n").toLatin1()); +// //_socket->write(("0" + script + "\0").toLatin1()); +//} +// +//void MainWindow::onSocketConnected() { +// _socket->write(QString("1\r\n").toLatin1()); +// //_socket->write(QString("1").toLatin1()); +// +//} +// +//void MainWindow::onSocketDisconnected() { +// _configurationWidget->socketDisconnected(); +// _timeControlWidget->socketDisconnected(); +// _informationWidget->socketDisconnected(); +// _timelineWidget->socketDisconnected(); +// +// _informationWidget->logInformation("Disconnected."); +//} +// +//std::string MainWindow::nextTarget() const { +// return _timelineWidget->nextTarget(); +//} +// +//void MainWindow::fullyConnected() { +// _informationWidget->logInformation("Connected to " + _socket->peerName() + " on port " + QString::number(_socket->peerPort()) + "."); +// +// _configurationWidget->socketConnected(); +// _timeControlWidget->socketConnected(); +// _informationWidget->socketConnected(); +// _timelineWidget->socketConnected(); +//} diff --git a/apps/Launcher/mainwindow.h b/apps/Launcher/mainwindow.h new file mode 100644 index 0000000000..89d2a21ce8 --- /dev/null +++ b/apps/Launcher/mainwindow.h @@ -0,0 +1,82 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __MAINWINDOW_H__ +#define __MAINWINDOW_H__ + +#include +#include + +class InformationWidget; + +class MainWindow : public QWidget { +Q_OBJECT +public: + MainWindow(); + ~MainWindow(); + +private slots: + void shortcutButtonPressed(); + +private: + InformationWidget* _informationWidget; +}; + +//class MainWindow : public QWidget { +//Q_OBJECT +//public: +// MainWindow(); +// ~MainWindow(); +// +// std::string nextTarget() const; +// +//public slots: +// void sendScript(QString script); +// +//private slots: +// void onConnect(QString host, QString port); +// void onDisconnect(); +// +// void onSocketConnected(); +// void onSocketDisconnected(); +// +// void readTcpData(); +// void handleStatusMessage(QByteArray data); +// void handlePlaybook(QByteArray data); +// +// void fullyConnected(); +// +//private: +// ConfigurationWidget* _configurationWidget; +// ControlWidget* _timeControlWidget; +// InformationWidget* _informationWidget; +// TimelineWidget* _timelineWidget; +// +// QTcpSocket* _socket; +// +// bool _hasHongKangTimeline = false; +// bool _hasLabelTimeline = false; +//}; + +#endif // __MAINWINDOW_H__ diff --git a/apps/Launcher/shortcutwidget.cpp b/apps/Launcher/shortcutwidget.cpp new file mode 100644 index 0000000000..899b60c82e --- /dev/null +++ b/apps/Launcher/shortcutwidget.cpp @@ -0,0 +1,29 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include "shortcutwidget.h" + +ShortcutWidget::ShortcutWidget(QWidget* parent) + : QWidget(parent) +{} diff --git a/apps/Launcher/shortcutwidget.h b/apps/Launcher/shortcutwidget.h new file mode 100644 index 0000000000..5a06a0d388 --- /dev/null +++ b/apps/Launcher/shortcutwidget.h @@ -0,0 +1,36 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __SHORTCUTWIDGET_H__ +#define __SHORTCUTWIDGET_H__ + +#include + +class ShortcutWidget : public QWidget { +Q_OBJECT +public: + ShortcutWidget(QWidget* parent); +}; + +#endif // __SHORTCUTWIDGET_H__ diff --git a/apps/Launcher/syncwidget.cpp b/apps/Launcher/syncwidget.cpp new file mode 100644 index 0000000000..d7414b95da --- /dev/null +++ b/apps/Launcher/syncwidget.cpp @@ -0,0 +1,25 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#include "syncwidget.h" diff --git a/apps/Launcher/syncwidget.h b/apps/Launcher/syncwidget.h new file mode 100644 index 0000000000..a5744859da --- /dev/null +++ b/apps/Launcher/syncwidget.h @@ -0,0 +1,34 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this * + * software and associated documentation files (the "Software"), to deal in the Software * + * without restriction, including without limitation the rights to use, copy, modify, * + * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * + * permit persons to whom the Software is furnished to do so, subject to the following * + * conditions: * + * * + * The above copyright notice and this permission notice shall be included in all copies * + * or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + ****************************************************************************************/ + +#ifndef __SYNCWIDGET_H__ +#define __SYNCWIDGET_H__ + +#include + +class SyncWidget : public QWidget { + +}; + +#endif // __SYNCWIDGET_H__