FuseTransferWidget Class Reference

This class implements the logic for a GUI that allows to transfer LUTs via FUSE. More...

#include <tools/firestation/fuse_transfer_widget.h>

Inheritance diagram for FuseTransferWidget:

List of all members.


Classes

struct  ClientData
class  LutRecord

Public Member Functions

 FuseTransferWidget ()
 Constructor.
virtual ~FuseTransferWidget ()
 Destructor.
void add_fountain_service (const char *name, const char *host_name, uint16_t port)
 Tell the widget that a new FUSE service has been discovered.
void remove_fountain_service (const char *name)
 Tell the widget that a service is not available any more.
void set_current_colormap (YuvColormap *colormap)
 Set the current colormap.
void set_upload_btn (Gtk::Button *btn_upload)
 Set the button to trigger the LUT upload.
void set_download_btn (Gtk::Button *btn_download)
 Set the button to trigger the LUT download.
void set_local_img (Gtk::Image *img_local)
 Set the Image to display the local LUT.
void set_local_layer_selector (Gtk::Scale *scl)
 Assign a Scale to switch between the layers of the loal colormap.
void set_remote_img (Gtk::Image *img_remote)
 Set the Image to display the remote LUT.
void set_remote_layer_selector (Gtk::Scale *scl)
 Assign a Scale to switch between the layers of the remote colormap.
void set_local_lut_list_trv (Gtk::TreeView *lut_list)
 Set the TreeView for the list of local LUTs.
void set_remote_lut_list_trv (Gtk::TreeView *lut_list)
 Set the TreeView for the list of remote LUTs.
void fuse_invalid_server_version (uint32_t local_version, uint32_t remote_version) throw ()
 Invalid version string received.
void fuse_connection_established () throw ()
 Connection has been established.
void fuse_connection_died () throw ()
 Connection died.
void fuse_inbound_received (FuseNetworkMessage *m) throw ()
 Message received.

Detailed Description

This class implements the logic for a GUI that allows to transfer LUTs via FUSE.

Author:
Daniel Beck

Definition at line 35 of file fuse_transfer_widget.h.


Constructor & Destructor Documentation

FuseTransferWidget::FuseTransferWidget (  ) 

Constructor.

Definition at line 45 of file fuse_transfer_widget.cpp.

References fawkes::LockQueue< Type >::clear().


Member Function Documentation

void FuseTransferWidget::add_fountain_service ( const char *  name,
const char *  host_name,
uint16_t  port 
)

Tell the widget that a new FUSE service has been discovered.

The widget will then attempt to connect to the host and list the available LUTs.

Parameters:
name the name of the service
host_name the name of the host the service is running on
port the port

Definition at line 106 of file fuse_transfer_widget.cpp.

References fawkes::LockQueue< Type >::push_locked().

void FuseTransferWidget::fuse_connection_died (  )  throw () [virtual]

Connection died.

Implements FuseClientHandler.

Definition at line 481 of file fuse_transfer_widget.cpp.

References fawkes::LockQueue< Type >::push_locked().

void FuseTransferWidget::fuse_connection_established (  )  throw () [virtual]

Connection has been established.

Implements FuseClientHandler.

Definition at line 476 of file fuse_transfer_widget.cpp.

void FuseTransferWidget::fuse_inbound_received ( FuseNetworkMessage m  )  throw () [virtual]

Message received.

An incoming message has been received and can now be processed. Note that if you want to work on the message after this method has finished you have to reference the message by calling FuseMessage::ref()!

Parameters:
m message to handle

Implements FuseClientHandler.

Definition at line 493 of file fuse_transfer_widget.cpp.

References FuseLutContent::buffer(), FUSE_lutinfo_t::bytes_per_cell, FuseLutContent::depth(), FUSE_lutinfo_t::depth, FuseLutListContent::has_next(), FuseLutContent::height(), FUSE_lutinfo_t::height, FUSE_lutinfo_t::lut_id, FuseLutListContent::next(), fawkes::Exception::print_trace(), FuseLutContent::width(), and FUSE_lutinfo_t::width.

void FuseTransferWidget::fuse_invalid_server_version ( uint32_t  local_version,
uint32_t  remote_version 
) throw () [virtual]

Invalid version string received.

The remote end has a different incompatible FUSE version.

Parameters:
local_version version that the FuseClient speaks
remote_version version that the remote FUSE server speaks.

Implements FuseClientHandler.

Definition at line 469 of file fuse_transfer_widget.cpp.

void FuseTransferWidget::remove_fountain_service ( const char *  name  ) 

Tell the widget that a service is not available any more.

All entries in the list of remote LUTs for the corresponding service will be deleted.

Parameters:
name the name of the service

Definition at line 126 of file fuse_transfer_widget.cpp.

void FuseTransferWidget::set_current_colormap ( YuvColormap colormap  ) 

Set the current colormap.

The current colormap is the local colormap that is currently trained.

Parameters:
colormap the colormap

Definition at line 150 of file fuse_transfer_widget.cpp.

References YuvColormap::depth(), YuvColormap::height(), and YuvColormap::width().

void FuseTransferWidget::set_download_btn ( Gtk::Button *  btn  ) 

Set the button to trigger the LUT download.

Parameters:
btn the download button

Definition at line 206 of file fuse_transfer_widget.cpp.

void FuseTransferWidget::set_local_img ( Gtk::Image *  img  ) 

Set the Image to display the local LUT.

Parameters:
img the local LUT image

Definition at line 215 of file fuse_transfer_widget.cpp.

References ColormapViewerWidget::set_colormap_img().

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_local_layer_selector ( Gtk::Scale *  scl  ) 

Assign a Scale to switch between the layers of the loal colormap.

Parameters:
scl a Gtk::Scale

Definition at line 225 of file fuse_transfer_widget.cpp.

References ColormapViewerWidget::set_layer_selector().

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_local_lut_list_trv ( Gtk::TreeView *  trv  ) 

Set the TreeView for the list of local LUTs.

Parameters:
trv the TreeView for the list of local LUTs

Definition at line 253 of file fuse_transfer_widget.cpp.

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_remote_img ( Gtk::Image *  img  ) 

Set the Image to display the remote LUT.

Parameters:
img the remote LUT Image

Definition at line 234 of file fuse_transfer_widget.cpp.

References ColormapViewerWidget::set_colormap_img().

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_remote_layer_selector ( Gtk::Scale *  scl  ) 

Assign a Scale to switch between the layers of the remote colormap.

Parameters:
scl a Gtk::Scale

Definition at line 244 of file fuse_transfer_widget.cpp.

References ColormapViewerWidget::set_layer_selector().

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_remote_lut_list_trv ( Gtk::TreeView *  trv  ) 

Set the TreeView for the list of remote LUTs.

Parameters:
trv the TreeView for the list of remote LUTs

Definition at line 270 of file fuse_transfer_widget.cpp.

Referenced by Firestation::Firestation().

void FuseTransferWidget::set_upload_btn ( Gtk::Button *  btn  ) 

Set the button to trigger the LUT upload.

Parameters:
btn the upload button

Definition at line 196 of file fuse_transfer_widget.cpp.

Referenced by Firestation::Firestation().


The documentation for this class was generated from the following files: