Skip to content
Snippets Groups Projects
Commit 005617bd authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add initial control window

parent f7806adc
No related branches found
No related tags found
1 merge request!23Feature/gui implements #53
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
set(GUISRC set(GUISRC
src/main.cpp src/main.cpp
src/ctrl_window.cpp
) )
add_executable(ftl-gui ${GUISRC}) add_executable(ftl-gui ${GUISRC})
......
#include "ctrl_window.hpp"
#include <nanogui/layout.h>
using ftl::gui::ControlWindow;
ControlWindow::ControlWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl)
: nanogui::Window(parent, "Control"), ctrl_(ctrl) {
setLayout(new nanogui::GroupLayout());
}
ControlWindow::~ControlWindow() {
}
#ifndef _FTL_GUI_CTRLWINDOW_HPP_
#define _FTL_GUI_CTRLWINDOW_HPP_
#include <nanogui/window.h>
#include <ftl/master.hpp>
namespace ftl {
namespace gui {
/**
* Manage connected nodes and add new connections.
*/
class ControlWindow : public nanogui::Window {
public:
ControlWindow(nanogui::Widget *parent, ftl::ctrl::Master *ctrl);
~ControlWindow();
private:
ftl::ctrl::Master *ctrl_;
};
}
}
#endif // _FTL_GUI_CTRLWINDOW_HPP_
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <nanogui/combobox.h> #include <nanogui/combobox.h>
#include <nanogui/label.h> #include <nanogui/label.h>
#include "ctrl_window.hpp"
using std::string; using std::string;
using ftl::rgbd::RGBDSource; using ftl::rgbd::RGBDSource;
...@@ -188,6 +190,8 @@ class FTLApplication : public nanogui::Screen { ...@@ -188,6 +190,8 @@ class FTLApplication : public nanogui::Screen {
}); });
window = new ftl::gui::ControlWindow(this, controller);
setVisible(true); setVisible(true);
performLayout(); performLayout();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment