OpenWalnut
1.5.0dev
|
This widget controls the colormapper of openwalnut. More...
#include <WQtColormapper.h>
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... | |
This widget controls the colormapper of openwalnut.
It directly interacts with WGEColormapper.
Definition at line 48 of file WQtColormapper.h.
|
explicit |
Default constructor.
parent | Parent widget. |
Definition at line 57 of file WQtColormapper.cpp.
References WQtDockWidget::addTitleAction(), WGEColormapping::Deregistered, WQtGui::getMainWindow(), handleTextureClicked(), WGEColormapping::instance(), m_deregisterConnection, m_layout, m_registerConnection, m_replaceConnection, m_sortConnection, m_textureListWidget, WGETexture< TextureType >::MAX_NUMBER_OF_TEXTURES, moveItemBottom(), moveItemDown(), moveItemTop(), moveItemUp(), pushUpdateEvent(), WGEColormapping::Registered, WGEColormapping::Replaced, rowsMoved(), and WGEColormapping::Sorted.
|
virtual |
Destructor.
Definition at line 118 of file WQtColormapper.cpp.
References m_deregisterConnection, m_registerConnection, and m_sortConnection.
|
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.
event | the event that got transmitted. |
Definition at line 259 of file WQtColormapper.cpp.
References update().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
privateslot |
A item was moved into another row.
sourceParent | parent of the item(s) moved. |
sourceStart | items moved start index |
sourceEnd | items moved end index (when multiple selected) |
destinationParent | item moved as childs for this item |
destinationRow | items moved to this position |
Definition at line 365 of file WQtColormapper.cpp.
References WQtColormapper::WQtTextureListItem::getTexture(), WGEColormapping::instance(), and m_textureListWidget.
Referenced by WQtColormapper().
void WQtColormapper::selectTexture | ( | std::shared_ptr< WDataSet > | dataSet | ) |
Select a certain texture in the texture sorter belonging to the specified dataset.
dataSet | this data set will be selected after calling this method |
Definition at line 352 of file WQtColormapper.cpp.
References WQtColormapper::WQtTextureListItem::getTexture(), and m_textureListWidget.
|
signal |
Indicates that a texture has been clicked and return the texture.
texture | the texture that got selected |
Referenced by handleTextureClicked().
|
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().
|
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().
|
private |
Layout of the widget.
Definition at line 93 of file WQtColormapper.h.
Referenced by WQtColormapper().
|
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().
|
private |
Connection of the WGEColormapping signal "replaced" to the member function pushUpdateEvent.
Definition at line 108 of file WQtColormapper.h.
Referenced by WQtColormapper().
|
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().
|
private |
pointer to the tree widget
Definition at line 92 of file WQtColormapper.h.
Referenced by handleTextureClicked(), moveItemBottom(), moveItemDown(), moveItemTop(), moveItemUp(), rowsMoved(), selectTexture(), update(), and WQtColormapper().