OpenWalnut  1.5.0dev
Classes | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
WQtColormapper Class Reference

This widget controls the colormapper of openwalnut. More...

#include <WQtColormapper.h>

+ Inheritance diagram for WQtColormapper:
+ Collaboration diagram for WQtColormapper:

Classes

class  WQtTextureListItem
 This class represents a texture item in the list widget. More...
 

Signals

void textureSelectionChanged (osg::ref_ptr< WGETexture3D > texture)
 Indicates that a texture has been clicked and return the texture. More...
 

Public Member Functions

 WQtColormapper (QWidget *parent=0)
 Default constructor. More...
 
virtual ~WQtColormapper ()
 Destructor. More...
 
void selectTexture (std::shared_ptr< WDataSet > dataSet)
 Select a certain texture in the texture sorter belonging to the specified dataset. More...
 
- Public Member Functions inherited from WQtDockWidget
 WQtDockWidget (const QString &title, QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget with title. More...
 
 WQtDockWidget (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags())
 Construct dock widget. More...
 
virtual ~WQtDockWidget ()
 Destructor. More...
 
virtual void addTitleProperty (WPropTrigger prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropBool prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleProperty (WPropGroup prop, WGEImage::SPtr icon=WGEImage::SPtr())
 Add a property to the title of this dock. More...
 
virtual void addTitleAction (QAction *action, bool instantPopup=false)
 Add the given action to the titlebar. More...
 
virtual void addTitleButton (QToolButton *button)
 Add the given tool button to the titlebar. More...
 
virtual void removeTitleAction (QAction *action)
 Remove the given action from the list. More...
 
virtual void addTitleSeperator ()
 Add a separator. More...
 
virtual void addTitleWidget (QWidget *widget)
 Add an arbitrary widget. More...
 
virtual void removeTitleWidget (QWidget *widget)
 Remove the specified widget from the title bar. More...
 
virtual void setHelpContext (const QString &id)
 Set a string which identifies help material for this dock. More...
 
virtual const QString & getHelpContext ()
 Return the help context id. More...
 
virtual void saveSettings ()
 Save settings. More...
 
virtual void restoreSettings ()
 Restore settings. More...
 
void disableCloseButton (bool disable=true)
 Disable close button? Might come in handy when embedding these widgets into others. More...
 

Protected Member Functions

virtual bool event (QEvent *event)
 Custom event dispatcher. More...
 
- Protected Member Functions inherited from WQtDockWidget
virtual void closeEvent (QCloseEvent *event)
 Called whenever a close event is received. More...
 

Private Slots

void rowsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
 A item was moved into another row. More...
 
void handleTextureClicked ()
 Handles a click to a texture in the list. More...
 
void moveItemDown ()
 change order of items, move currently selected item down More...
 
void moveItemUp ()
 change order of items, move currently selected item up More...
 
void moveItemBottom ()
 change order of items, move currently selected item to bottom More...
 
void moveItemTop ()
 change order of items, move currently selected item to top More...
 

Private Member Functions

void pushUpdateEvent ()
 Called by the colormapper causing an update event being pushed to the event queue. More...
 
void update ()
 Update the list view from the list of data sets. More...
 

Private Attributes

QListWidget * m_textureListWidget
 pointer to the tree widget More...
 
QVBoxLayout * m_layout
 Layout of the widget. More...
 
boost::signals2::connection m_registerConnection
 Connection of the WGEColormapping signal "registered" to the member function pushUpdateEvent. More...
 
boost::signals2::connection m_deregisterConnection
 Connection of the WGEColormapping signal "deregistered" to the member function pushUpdateEvent. More...
 
boost::signals2::connection m_replaceConnection
 Connection of the WGEColormapping signal "replaced" to the member function pushUpdateEvent. More...
 
boost::signals2::connection m_sortConnection
 Connection of the WGEColormapping signal "Sort" to the member function pushUpdateEvent. More...
 

Additional Inherited Members

- Public Slots inherited from WQtDockWidget
void showHelp ()
 Show help. More...
 

Detailed Description

This widget controls the colormapper of openwalnut.

It directly interacts with WGEColormapper.

Definition at line 48 of file WQtColormapper.h.

Constructor & Destructor Documentation

◆ WQtColormapper()

WQtColormapper::WQtColormapper ( QWidget *  parent = 0)
explicit

◆ ~WQtColormapper()

WQtColormapper::~WQtColormapper ( )
virtual

Destructor.

Definition at line 118 of file WQtColormapper.cpp.

References m_deregisterConnection, m_registerConnection, and m_sortConnection.

Member Function Documentation

◆ event()

bool WQtColormapper::event ( QEvent event)
protectedvirtual

Custom event dispatcher.

Gets called by QT's Event system every time an event got sent to this widget. This event handler processes several custom events.

Parameters
eventthe event that got transmitted.
Returns
true if the event got handled properly.

Definition at line 259 of file WQtColormapper.cpp.

References update().

+ Here is the call graph for this function:

◆ handleTextureClicked

void WQtColormapper::handleTextureClicked ( )
privateslot

Handles a click to a texture in the list.

Definition at line 304 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), m_textureListWidget, and textureSelectionChanged().

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemBottom

void WQtColormapper::moveItemBottom ( )
privateslot

change order of items, move currently selected item to bottom

Definition at line 332 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemDown

void WQtColormapper::moveItemDown ( )
privateslot

change order of items, move currently selected item down

Definition at line 312 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemTop

void WQtColormapper::moveItemTop ( )
privateslot

change order of items, move currently selected item to top

Definition at line 342 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemUp

void WQtColormapper::moveItemUp ( )
privateslot

change order of items, move currently selected item up

Definition at line 322 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pushUpdateEvent()

void WQtColormapper::pushUpdateEvent ( )
private

Called by the colormapper causing an update event being pushed to the event queue.

Definition at line 253 of file WQtColormapper.cpp.

Referenced by WQtColormapper().

+ Here is the caller graph for this function:

◆ rowsMoved

void WQtColormapper::rowsMoved ( const QModelIndex &  sourceParent,
int  sourceStart,
int  sourceEnd,
const QModelIndex &  destinationParent,
int  destinationRow 
)
privateslot

A item was moved into another row.

Parameters
sourceParentparent of the item(s) moved.
sourceStartitems moved start index
sourceEnditems moved end index (when multiple selected)
destinationParentitem moved as childs for this item
destinationRowitems moved to this position

Definition at line 365 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by WQtColormapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectTexture()

void WQtColormapper::selectTexture ( std::shared_ptr< WDataSet dataSet)

Select a certain texture in the texture sorter belonging to the specified dataset.

Parameters
dataSetthis data set will be selected after calling this method

Definition at line 352 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), and m_textureListWidget.

+ Here is the call graph for this function:

◆ textureSelectionChanged

void WQtColormapper::textureSelectionChanged ( osg::ref_ptr< WGETexture3D texture)
signal

Indicates that a texture has been clicked and return the texture.

Parameters
texturethe texture that got selected

Referenced by handleTextureClicked().

+ Here is the caller graph for this function:

◆ update()

void WQtColormapper::update ( )
private

Update the list view from the list of data sets.

Definition at line 271 of file WQtColormapper.cpp.

References WQtColormapper::WQtTextureListItem::getTexture(), WQtColormapper::WQtTextureListItem::getWidget(), WGEColormapping::instance(), and m_textureListWidget.

Referenced by event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deregisterConnection

boost::signals2::connection WQtColormapper::m_deregisterConnection
private

Connection of the WGEColormapping signal "deregistered" to the member function pushUpdateEvent.

Definition at line 103 of file WQtColormapper.h.

Referenced by WQtColormapper(), and ~WQtColormapper().

◆ m_layout

QVBoxLayout* WQtColormapper::m_layout
private

Layout of the widget.

Definition at line 93 of file WQtColormapper.h.

Referenced by WQtColormapper().

◆ m_registerConnection

boost::signals2::connection WQtColormapper::m_registerConnection
private

Connection of the WGEColormapping signal "registered" to the member function pushUpdateEvent.

Definition at line 98 of file WQtColormapper.h.

Referenced by WQtColormapper(), and ~WQtColormapper().

◆ m_replaceConnection

boost::signals2::connection WQtColormapper::m_replaceConnection
private

Connection of the WGEColormapping signal "replaced" to the member function pushUpdateEvent.

Definition at line 108 of file WQtColormapper.h.

Referenced by WQtColormapper().

◆ m_sortConnection

boost::signals2::connection WQtColormapper::m_sortConnection
private

Connection of the WGEColormapping signal "Sort" to the member function pushUpdateEvent.

Definition at line 113 of file WQtColormapper.h.

Referenced by WQtColormapper(), and ~WQtColormapper().

◆ m_textureListWidget

QListWidget* WQtColormapper::m_textureListWidget
private

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