fast::Window class

Abstract base class for windows.

Base classes

class AttributeObject

Derived classes

class DualViewWindow
A Window with 2 views.
class MultiViewWindow
Window with multiple views.
class SimpleGUI
class SimpleWindow
A Window with only 1 View.
class SlicerWindow
Window for showing slices of 3D data.
class TrackingGUI

Public static functions

static void initializeQtApp()
static auto getMainGLContext() -> QGLContext*
static auto getSecondaryGLContext() -> QGLContext*
static void setMainGLContext(QGLContext* context)
static void cleanup()

Constructors, destructors, conversion operators

Window() protected

Public functions

void setTimeout(unsigned int milliseconds) virtual
void start() virtual
void run() virtual
Opens window and starts pipeline on all renderers.
void setWidth(uint width)
void setHeight(uint height)
void setSize(uint width, uint height)
void enableMaximized()
void disableMaximized()
void enableFullscreen()
void disableFullscreen()
void setTitle(std::string)
void clearViews()
auto getViews() -> std::vector<View*>
auto getView(uint i) -> View*
void addView(View* view)
auto getScreenWidth() const -> int
auto getScreenHeight() const -> int
auto getScalingFactor() const -> float
auto getWidget() -> QWidget*
void addProcessObject(std::shared_ptr<ProcessObject> po)
auto getProcessObjects() -> std::vector<std::shared_ptr<ProcessObject>>
void clearProcessObjects()
void set2DMode()
Set 2D mode for all views in this window.
void set3DMode()
Set 3D mode for all views in this window.
auto connect(uint id, std::shared_ptr<DataObject> data) -> std::shared_ptr<Window> virtual
auto connect(uint id, std::shared_ptr<ProcessObject> PO, uint portID = 0) -> std::shared_ptr<Window> virtual
auto connect(QWidget* widget, WidgetPosition position = WidgetPosition::BOTTOM) -> std::shared_ptr<Window>
auto connect(std::vector<QWidget*> widgets, WidgetPosition position = WidgetPosition::BOTTOM) -> std::shared_ptr<Window>
auto getNameOfClass() -> std::string

Public slots

void stop()

Protected functions

void startComputationThread()
void stopComputationThread()
auto getComputationThread() -> std::shared_ptr<ComputationThread>
auto createView() -> View*
void setCenterWidget(QWidget* widget)
void setCenterLayout(QLayout* layout)

Protected variables

WindowWidget* mWidget
unsigned int mWidth
unsigned int mHeight
bool mFullscreen
bool mMaximized
unsigned int mTimeout
float mGUIScalingFactor
QEventLoop* mEventLoop
std::shared_ptr<ComputationThread> mThread
std::mutex m_mutex
QHBoxLayout* m_mainHLayout
QVBoxLayout* m_mainVLayout
QVBoxLayout* m_mainTopLayout
QVBoxLayout* m_mainBottomLayout
QVBoxLayout* m_mainLeftLayout
QVBoxLayout* m_mainRightLayout

Function documentation

void fast::Window::setTimeout(unsigned int milliseconds) virtual

Makes the window close after a specific number of ms

void fast::Window::start() virtual

Starts an update loop on all renderers attached to each view in this window.

int fast::Window::getScreenWidth() const

Returns width in pixels

Get screen width in pixels

int fast::Window::getScreenHeight() const

Returns height in pixels

Get screen height in pixels

float fast::Window::getScalingFactor() const

Get GUI scaling factor

void fast::Window::addProcessObject(std::shared_ptr<ProcessObject> po)

Add a process object to be updated by the computation thread.

std::vector<std::shared_ptr<ProcessObject>> fast::Window::getProcessObjects()

Get process objects to be updated by the computation thread.

void fast::Window::clearProcessObjects()

Clear the process objects to be updated by the computation thread.