ContainerClass for components. More...
#include <QmitkFunctionalityComponentContainer.h>
Public Slots | |
virtual void | SetContentContainerVisibility (bool) |
Method to set the "GetContentContainer"-visible or not, addicted to the visibility of a parent-component and the status of the checkable ComboBox from "GetMainCheckBoxContainer()". | |
virtual void | TreeChanged () |
The TreeChanged-slot-method updates the TreeNodeSelector if the datatree changes. | |
virtual void | DataStorageChanged (mitk::DataStorage::Pointer ds) |
Public Member Functions | |
QmitkFunctionalityComponentContainer (QObject *parent=0, const char *parentName=0, bool updateSelector=true, bool showSelector=true) | |
Standard-Constructor. | |
virtual | ~QmitkFunctionalityComponentContainer () |
Destructor. | |
virtual void | CreateConnections () |
Method to create all Signale-Slot-Connections. | |
virtual void | CreateQtPartControl (QWidget *parent, mitk::DataStorage::Pointer dataStorage) |
Method to create the GUI-Object. | |
void | CreateNavigationButtons () |
Method to create the forward and backward -buttons to navigate through the wizard. | |
void | SetWizardText (const QString &text) |
Method to change the wizardText. | |
Ui::QmitkFunctionalityComponentContainerGUI * | GetFunctionalityComponentContainerGUI () |
Method to choose the right wizard text, depending on the wizardpage. | |
virtual void | SetDataStorage (mitk::DataStorage::Pointer dataStorage) |
Method to set the DataStorage. | |
virtual mitk::DataStorage::Pointer | GetDataStorage () |
Method to get the DataStorage. | |
virtual void | SetComponentName (QString name) |
Method to set the Name of the FunctionalityComponent. | |
virtual QString | GetComponentName () |
Method to get the Name of the FunctionalityComponent. | |
QWidget * | GetGUI () |
Method to get the GUI of this component. | |
virtual QmitkDataStorageComboBox * | GetTreeNodeSelector () |
virtual void | SetSelectorVisibility (bool visibility) |
Method to set the Image Selector visible or invisible. | |
QmitkStdMultiWidget * | GetMultiWidget () |
virtual QGroupBox * | GetContentContainer () |
Method to return the ComboBox that includes all GUI-elements instead of the outermost checkable CheckBox and that can be set visible or not. | |
virtual QGroupBox * | GetMainCheckBoxContainer () |
Method to return the outermost checkable ComboBox that is to decide whether the content shall be shown or not. | |
virtual void | SetShowTreeNodeSelector (bool show) |
Method to set the Tree-Node-Selector visible or not as his parent group-box is set shown or not. | |
virtual QGroupBox * | GetImageContent () |
Method to return the group-box that contains the tree-node-selector. | |
virtual mitk::Image * | GetParentMitkImage () |
Method to return the Image Selected in the Container Combo Box. | |
QPushButton * | GetNextButton () |
Method to return the NextButton to switch to the next widgetStackPage. | |
QPushButton * | GetBackButton () |
Method to return the BackButton to switch to the last widgetStackPage. | |
virtual void | AddComponent (QmitkFunctionalityComponentContainer *componentContainer) |
method to add components into this component. | |
virtual void | AddComponent (QmitkFunctionalityComponentContainer *componentContainer, QString label, int stackPage) |
method to add components into this component. | |
virtual void | TreeChanged (const itk::EventObject &treeChangedEvent) |
virtual void | Activated () |
Method to set m_Activated to true. | |
virtual void | Deactivated () |
Method to set m_Activated to false. | |
void | ImageSelected (const mitk::DataNode *item) |
Slot method that will be called if TreeNodeSelector widget was activated. | |
Public Attributes | |
bool | m_UpdateSelector |
Attribute to decide whether the selector shall be updated when a parent-Selector is updatet or not. | |
bool | m_ShowSelector |
Attribute to decide whether the selector shall be shown or not. | |
Protected Member Functions | |
virtual void | UpdateDataTreeComboBoxes () |
Vector with all added components. | |
Protected Attributes | |
unsigned long | m_ObserverTag |
ObserverTag. | |
QWidget * | m_GUI |
Graphical User Interface for the component in general QWidget-Type. | |
bool | m_Active |
Attribute whether the component is active or not. | |
QmitkDataStorageComboBox * | m_SelectedItem |
Item on the actual selected Image in the TreeNodeSelector. | |
mitk::DataStorage::Pointer | m_DataStorage |
Item on the actual selected Image in the TreeNodeSelector. |
ContainerClass for components.
The FunctionalityComponentContainer is a containerclass for several components inherit from it. All Components including to one FunctionalityComponentContainer can be used together as one applied functionality. I.e. in particular that new functionalities can be combined with different components. As common ground for all inherit classes the FunctionalityComponentContainer includes a selector for marked data like image(s), segmentation(s) or model(s).
Definition at line 56 of file QmitkFunctionalityComponentContainer.h.
QmitkFunctionalityComponentContainer::QmitkFunctionalityComponentContainer | ( | QObject * | parent = 0 , |
const char * | parentName = 0 , |
||
bool | updateSelector = true , |
||
bool | showSelector = true |
||
) |
Standard-Constructor.
Definition at line 46 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseComponent::SetAvailability().
: QmitkBaseFunctionalityComponent(parent, parentName), m_UpdateSelector(updateSelector), m_ShowSelector(showSelector), m_GUI(NULL), //m_ParentMitkImage(NULL), //m_ParentMitkImageIterator(NULL), m_Active(false), m_SelectedItem(NULL), m_FunctionalityComponentContainerGUI(NULL), m_Parent(parent), //m_ParentName(parentName), m_ComponentName("ComponentContainer"), //m_MultiWidget(mitkStdMultiWidget), m_Spacer(NULL), //m_MulitWidget(this->GetActiveStdMultiWidget()), m_BackButton(NULL), m_NextButton(NULL), m_MaximumWidgedStackSize(-1) { SetAvailability(true); }
QmitkFunctionalityComponentContainer::~QmitkFunctionalityComponentContainer | ( | ) | [virtual] |
void QmitkFunctionalityComponentContainer::Activated | ( | ) | [virtual] |
Method to set m_Activated to true.
Reimplemented from QmitkBaseComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 340 of file QmitkFunctionalityComponentContainer.cpp.
References m_Active, QmitkBaseComponent::m_AddedChildList, and TreeChanged().
Referenced by SetContentContainerVisibility().
{ TreeChanged(); QmitkBaseFunctionalityComponent::Activated(); m_Active = true; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Activated(); } }
void QmitkFunctionalityComponentContainer::AddComponent | ( | QmitkFunctionalityComponentContainer * | componentContainer, |
QString | label, | ||
int | stackPage | ||
) | [virtual] |
method to add components into this component.
Definition at line 395 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseComponent::AddComponentListener(), CreateConnections(), CreateQtPartControl(), GetGUI(), m_DataStorage, m_GUI, and Ui_QmitkFunctionalityComponentContainerGUI::m_WidgetStack.
{ if(component!=NULL) { QWidget* visibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); int idVisibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->indexOf(visibleWidget); if(idVisibleWidget > m_MaximumWidgedStackSize) { m_MaximumWidgedStackSize = idVisibleWidget; } if(m_MaximumWidgedStackSize < stackPage) { QWidget* w = new QWidget(m_FunctionalityComponentContainerGUI->m_WidgetStack); m_FunctionalityComponentContainerGUI->m_WidgetStack->insertTab(stackPage, w, label); m_MaximumWidgedStackSize++; m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(stackPage); visibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); idVisibleWidget = m_FunctionalityComponentContainerGUI->m_WidgetStack->indexOf(visibleWidget); new QVBoxLayout(visibleWidget); // QT3: new QVBoxLayout(visibleWidget, QBoxLayout::TopToBottom); } QLayout* layout; if(m_FunctionalityComponentContainerGUI->m_WidgetStack->layout() == 0) { layout = new QVBoxLayout( (QWidget*)(m_FunctionalityComponentContainerGUI->m_WidgetStack)); } else { layout = m_FunctionalityComponentContainerGUI->m_WidgetStack->layout(); } component->CreateQtPartControl(m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(), this->m_DataStorage); QWidget* componentWidget = component->GetGUI(); //CreateControlWidget(m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget()); AddComponentListener(component); //QTabWidget* myTabWidget = //m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(stackPage); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(stackPage); QWidget* theCurrentWidget=m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget(); QLayout* theCurrentLayout = theCurrentWidget->layout(); theCurrentLayout->addWidget(componentWidget); //m_FunctionalityComponentContainerGUI->m_WidgetStack->currentWidget()->layout()->addWidget(componentWidget); // QWidget* myWidget = myTabWidget->page(stackPage); // QLayout* myLayout = myWidget->layout(); // myWidget->layout()->add(componentWidget); m_FunctionalityComponentContainerGUI->m_WidgetStack->setShown(true); m_FunctionalityComponentContainerGUI->m_WidgetStack->updateGeometry(); m_FunctionalityComponentContainerGUI->m_WidgetStack->layout()->activate(); componentWidget->setShown(true); component->CreateConnections(); m_GUI->repaint(); } }
void QmitkFunctionalityComponentContainer::AddComponent | ( | QmitkFunctionalityComponentContainer * | componentContainer ) | [virtual] |
method to add components into this component.
Definition at line 363 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseComponent::AddComponentListener(), CreateConnections(), QmitkBaseComponent::CreateControlWidget(), and m_GUI.
{ if(component!=NULL) { QWidget* componentWidget = component->CreateControlWidget(m_GUI); AddComponentListener(component); m_GUI->layout()->addWidget(componentWidget); component->CreateConnections(); if(m_Spacer != NULL) { m_GUI->layout()->removeItem(m_Spacer); } QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); m_Spacer = spacer; m_GUI->layout()->addItem( m_Spacer ); m_GUI->repaint(); } }
void QmitkFunctionalityComponentContainer::CreateConnections | ( | ) | [virtual] |
Method to create all Signale-Slot-Connections.
Reimplemented from QmitkBaseComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 159 of file QmitkFunctionalityComponentContainer.cpp.
References ImageSelected(), Ui_QmitkFunctionalityComponentContainerGUI::m_ContainerBorder, Ui_QmitkFunctionalityComponentContainerGUI::m_TreeNodeSelector, and SetContentContainerVisibility().
Referenced by AddComponent(), and CreateQtPartControl().
{ if ( m_FunctionalityComponentContainerGUI ) { connect( (QObject*)(m_FunctionalityComponentContainerGUI->m_TreeNodeSelector), SIGNAL(OnSelectionChanged (const mitk::DataNode *)), (QObject*) this, SLOT(ImageSelected(const mitk::DataNode *))); connect( (QObject*)(m_FunctionalityComponentContainerGUI->m_ContainerBorder), SIGNAL(toggled(bool)), (QObject*) this, SLOT(SetContentContainerVisibility(bool))); } }
void QmitkFunctionalityComponentContainer::CreateNavigationButtons | ( | ) |
Method to create the forward and backward -buttons to navigate through the wizard.
Definition at line 453 of file QmitkFunctionalityComponentContainer.cpp.
References GetImageContent(), m_GUI, Ui_QmitkFunctionalityComponentContainerGUI::m_WidgetStack, and SetWizardText().
{ //QBoxLayout * buttonLayout = new QHBoxLayout(GetImageContent()->layout()); QWidget* funcWidget = (QWidget*)m_FunctionalityComponentContainerGUI; QLayout *functionalityLayout = funcWidget->layout(); QBoxLayout * buttonLayout = new QHBoxLayout(funcWidget); if ( QBoxLayout* boxLayout = dynamic_cast<QBoxLayout*>(functionalityLayout) ) { boxLayout->addLayout( buttonLayout ); } //if(m_BackButton==NULL) //{ // m_BackButton = new QPushButton("<<", GetImageContent()); //} //if(m_NextButton==NULL) //{ // m_NextButton = new QPushButton(">>", GetImageContent()); //} if(m_BackButton==NULL) { m_BackButton = new QPushButton("<<", (QWidget*)(m_FunctionalityComponentContainerGUI)); } if(m_NextButton==NULL) { m_NextButton = new QPushButton(">>", (QWidget*)(m_FunctionalityComponentContainerGUI)); } buttonLayout->addWidget(m_BackButton); buttonLayout->addWidget(m_NextButton); //m_GUI->layout()->addChildLayout(buttonLayout); m_BackButton->setShown(true); m_NextButton->setShown(true); //m_GUI->layout()->AlignTop; m_GUI->layout()->activate(); m_GUI->repaint(); // connect( (QObject*)(m_NextButton), SIGNAL(pressed()), (QObject*) this, SLOT(NextButtonPressed())); // connect( (QObject*)(m_BackButton), SIGNAL(pressed()), (QObject*) this, SLOT(BackButtonPressed())); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(1); SetWizardText(""); GetImageContent()->updateGeometry(); if(m_Spacer != NULL) { m_GUI->layout()->removeItem(m_Spacer); } QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); m_Spacer = spacer; m_GUI->layout()->addItem( m_Spacer ); m_GUI->updateGeometry(); m_GUI->repaint(); }
void QmitkFunctionalityComponentContainer::CreateQtPartControl | ( | QWidget * | parent, |
mitk::DataStorage::Pointer | dataStorage | ||
) | [virtual] |
Method to create the GUI-Object.
Reimplemented in QmitkThresholdComponent.
Definition at line 264 of file QmitkFunctionalityComponentContainer.cpp.
References CreateConnections(), m_GUI, Ui_QmitkFunctionalityComponentContainerGUI::m_TreeNodeSelector, Ui_QmitkFunctionalityComponentContainerGUI::m_WidgetStack, mitk::NodePredicateDataType::New(), QmitkDataStorageComboBox::SetDataStorage(), SetDataStorage(), QmitkDataStorageComboBox::SetPredicate(), and Ui_QmitkFunctionalityComponentContainerGUI::setupUi().
Referenced by AddComponent().
{ if (m_FunctionalityComponentContainerGUI == NULL) { m_GUI = new QWidget; m_FunctionalityComponentContainerGUI = new Ui::QmitkFunctionalityComponentContainerGUI; m_FunctionalityComponentContainerGUI->setupUi(m_GUI); //m_GUI = parent; this->SetDataStorage(dataStorage); m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->SetDataStorage(dataStorage); m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->SetPredicate(mitk::NodePredicateDataType::New("Image")); m_FunctionalityComponentContainerGUI->m_WidgetStack->setCurrentIndex(0); //m_FunctionalityComponentContainerGUI->m_TreeNodeSelector()->SetDataTree(GetDataTreeIterator()); //m_FunctionalityComponentContainerGUI->GetContainerBorder()->setTitle("<bold>Select Image<\bold>"); //m_FunctionalityComponentContainerGUI->GetContainerBorder()->setLineWidth(0); } this->CreateConnections(); //m_MulitWidget = parent->GetActiveMultiWidget(); //m_FunctionalityComponentContainerGUI->m_TreeNodeSelector()->GetFilter()->SetFilter(mitk::IsBaseDataTypeWithoutProperty<mitk::Image>("isComponentThresholdImage")); }
void QmitkFunctionalityComponentContainer::DataStorageChanged | ( | mitk::DataStorage::Pointer | ds ) | [virtual, slot] |
Reimplemented from QmitkBaseFunctionalityComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 181 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseFunctionalityComponent::DataStorageChanged(), QmitkDataStorageComboBox::GetSelectedNode(), QmitkBaseComponent::m_AddedChildList, QmitkBaseFunctionalityComponent::m_ParentMitkImage, and Ui_QmitkFunctionalityComponentContainerGUI::m_TreeNodeSelector.
{ if(m_FunctionalityComponentContainerGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast<QmitkBaseFunctionalityComponent*>(m_AddedChildList[i]); if (functionalityComponent != NULL) { functionalityComponent->DataStorageChanged(ds); } } } if(m_FunctionalityComponentContainerGUI) { if(!m_FunctionalityComponentContainerGUI->m_TreeNodeSelector) return; if(!m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->GetSelectedNode()) return; if(!m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->GetSelectedNode()->GetData()) return; m_ParentMitkImage = static_cast<mitk::Image*> (m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->GetSelectedNode()->GetData()); if(m_FunctionalityComponentContainerGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast<QmitkBaseFunctionalityComponent*>(m_AddedChildList[i]); if (functionalityComponent != NULL) { if(!m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->GetSelectedNode()->GetData()) return; functionalityComponent->m_ParentMitkImage = static_cast<mitk::Image*> (m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->GetSelectedNode()->GetData()); } } } } //TreeChanged(;) }
void QmitkFunctionalityComponentContainer::Deactivated | ( | ) | [virtual] |
Method to set m_Activated to false.
Reimplemented from QmitkBaseComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 352 of file QmitkFunctionalityComponentContainer.cpp.
References m_Active, and QmitkBaseComponent::m_AddedChildList.
Referenced by SetContentContainerVisibility().
{ QmitkBaseFunctionalityComponent::Deactivated(); m_Active = false; for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->Deactivated(); } }
QPushButton * QmitkFunctionalityComponentContainer::GetBackButton | ( | ) |
Method to return the BackButton to switch to the last widgetStackPage.
Definition at line 388 of file QmitkFunctionalityComponentContainer.cpp.
{
return m_BackButton;
}
QString QmitkFunctionalityComponentContainer::GetComponentName | ( | ) | [virtual] |
Method to get the Name of the FunctionalityComponent.
Definition at line 82 of file QmitkFunctionalityComponentContainer.cpp.
{
return m_ComponentName;
}
QGroupBox * QmitkFunctionalityComponentContainer::GetContentContainer | ( | ) | [virtual] |
Method to return the ComboBox that includes all GUI-elements instead of the outermost checkable CheckBox and that can be set visible or not.
Reimplemented from QmitkBaseComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 290 of file QmitkFunctionalityComponentContainer.cpp.
References Ui_QmitkFunctionalityComponentContainerGUI::m_ImageContent.
Referenced by SetContentContainerVisibility().
{ return m_FunctionalityComponentContainerGUI->m_ImageContent; }
mitk::DataStorage::Pointer QmitkFunctionalityComponentContainer::GetDataStorage | ( | ) | [virtual] |
Method to get the DataStorage.
Reimplemented in QmitkThresholdComponent.
Definition at line 175 of file QmitkFunctionalityComponentContainer.cpp.
References m_DataStorage.
{ return m_DataStorage; }
Ui::QmitkFunctionalityComponentContainerGUI * QmitkFunctionalityComponentContainer::GetFunctionalityComponentContainerGUI | ( | ) |
Method to choose the right wizard text, depending on the wizardpage.
also the Graphical User Interface for the component, like m_GUI, but with its specific type
Definition at line 586 of file QmitkFunctionalityComponentContainer.cpp.
{
return m_FunctionalityComponentContainerGUI;
}
QWidget * QmitkFunctionalityComponentContainer::GetGUI | ( | ) |
Method to get the GUI of this component.
Definition at line 101 of file QmitkFunctionalityComponentContainer.cpp.
References m_GUI.
Referenced by AddComponent().
{ return m_GUI; }
QGroupBox * QmitkFunctionalityComponentContainer::GetImageContent | ( | ) | [virtual] |
Method to return the group-box that contains the tree-node-selector.
Reimplemented in QmitkThresholdComponent.
Definition at line 95 of file QmitkFunctionalityComponentContainer.cpp.
References Ui_QmitkFunctionalityComponentContainerGUI::m_ImageContent.
Referenced by CreateNavigationButtons(), SetShowTreeNodeSelector(), and SetWizardText().
{ return (QGroupBox*) m_FunctionalityComponentContainerGUI->m_ImageContent; }
QGroupBox * QmitkFunctionalityComponentContainer::GetMainCheckBoxContainer | ( | ) | [virtual] |
Method to return the outermost checkable ComboBox that is to decide whether the content shall be shown or not.
Reimplemented from QmitkBaseComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 296 of file QmitkFunctionalityComponentContainer.cpp.
References Ui_QmitkFunctionalityComponentContainerGUI::m_ContainerBorder.
Referenced by SetContentContainerVisibility().
{ return m_FunctionalityComponentContainerGUI->m_ContainerBorder; }
QmitkStdMultiWidget * QmitkFunctionalityComponentContainer::GetMultiWidget | ( | ) |
Definition at line 122 of file QmitkFunctionalityComponentContainer.cpp.
{
return m_MulitWidget;
}
QPushButton * QmitkFunctionalityComponentContainer::GetNextButton | ( | ) |
Method to return the NextButton to switch to the next widgetStackPage.
Definition at line 382 of file QmitkFunctionalityComponentContainer.cpp.
{
return m_NextButton;
}
mitk::Image * QmitkFunctionalityComponentContainer::GetParentMitkImage | ( | ) | [virtual] |
Method to return the Image Selected in the Container Combo Box.
Definition at line 107 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseFunctionalityComponent::m_ParentMitkImage.
{ return m_ParentMitkImage; }
QmitkDataStorageComboBox * QmitkFunctionalityComponentContainer::GetTreeNodeSelector | ( | ) | [virtual] |
Reimplemented in QmitkThresholdComponent.
Definition at line 112 of file QmitkFunctionalityComponentContainer.cpp.
References Ui_QmitkFunctionalityComponentContainerGUI::m_TreeNodeSelector.
Referenced by ImageSelected().
{ if(m_FunctionalityComponentContainerGUI) { return m_FunctionalityComponentContainerGUI->m_TreeNodeSelector; } else return NULL; }
void QmitkFunctionalityComponentContainer::ImageSelected | ( | const mitk::DataNode * | item ) | [virtual] |
Slot method that will be called if TreeNodeSelector widget was activated.
Reimplemented from QmitkBaseFunctionalityComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 225 of file QmitkFunctionalityComponentContainer.cpp.
References mitk::DataNode::GetData(), GetTreeNodeSelector(), QmitkBaseFunctionalityComponent::ImageSelected(), QmitkBaseComponent::m_AddedChildList, QmitkBaseFunctionalityComponent::m_ParentMitkImage, QmitkDataStorageComboBox::SetSelectedNode(), and TreeChanged().
Referenced by CreateConnections().
{ if(m_FunctionalityComponentContainerGUI != NULL) { mitk::DataNode::Pointer selectedItem = const_cast< mitk::DataNode*>(item); GetTreeNodeSelector()->SetSelectedNode(selectedItem); // m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->changeItem(); for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast<QmitkBaseFunctionalityComponent*>(m_AddedChildList[i]); if (functionalityComponent != NULL) //functionalityComponent->GetTreeNodeSelector()->SetSelectedNode(selectedItem); functionalityComponent->ImageSelected(item); } } if(m_FunctionalityComponentContainerGUI) { m_ParentMitkImage = static_cast<mitk::Image*> (item->GetData()); if(m_FunctionalityComponentContainerGUI != NULL) { for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { QmitkBaseFunctionalityComponent* functionalityComponent = dynamic_cast<QmitkBaseFunctionalityComponent*>(m_AddedChildList[i]); if (functionalityComponent != NULL) { functionalityComponent->m_ParentMitkImage = static_cast<mitk::Image*> (item->GetData()); } } } } TreeChanged(); }
void QmitkFunctionalityComponentContainer::SetComponentName | ( | QString | name ) | [virtual] |
Method to set the Name of the FunctionalityComponent.
Definition at line 76 of file QmitkFunctionalityComponentContainer.cpp.
Referenced by QmitkThresholdComponent::QmitkThresholdComponent().
{ m_ComponentName = name; }
void QmitkFunctionalityComponentContainer::SetContentContainerVisibility | ( | bool | ) | [virtual, slot] |
Method to set the "GetContentContainer"-visible or not, addicted to the visibility of a parent-component and the status of the checkable ComboBox from "GetMainCheckBoxContainer()".
Reimplemented from QmitkBaseComponent.
Definition at line 302 of file QmitkFunctionalityComponentContainer.cpp.
References Activated(), Deactivated(), GetContentContainer(), GetMainCheckBoxContainer(), and QmitkBaseComponent::m_AddedChildList.
Referenced by QmitkThresholdComponent::CreateConnections(), and CreateConnections().
{ if(GetMainCheckBoxContainer() != NULL) { if(GetMainCheckBoxContainer()->isChecked()) { Activated(); } else { Deactivated(); } } for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { if(m_AddedChildList[i]->GetContentContainer() != NULL) { m_AddedChildList[i]->GetContentContainer()->setShown(GetMainCheckBoxContainer()->isChecked()); } if(m_AddedChildList[i]->GetMainCheckBoxContainer() != NULL) { m_AddedChildList[i]->GetMainCheckBoxContainer()->setChecked(GetMainCheckBoxContainer()->isChecked()); } m_AddedChildList[i]->SetContentContainerVisibility(GetMainCheckBoxContainer()->isChecked()); } }
void QmitkFunctionalityComponentContainer::SetDataStorage | ( | mitk::DataStorage::Pointer | dataStorage ) | [virtual] |
Method to set the DataStorage.
Reimplemented in QmitkThresholdComponent.
Definition at line 169 of file QmitkFunctionalityComponentContainer.cpp.
References m_DataStorage.
Referenced by CreateQtPartControl().
{ m_DataStorage = dataStorage; }
void QmitkFunctionalityComponentContainer::SetSelectorVisibility | ( | bool | visibility ) | [virtual] |
Method to set the Image Selector visible or invisible.
Reimplemented in QmitkThresholdComponent.
Definition at line 330 of file QmitkFunctionalityComponentContainer.cpp.
References m_GUI, Ui_QmitkFunctionalityComponentContainerGUI::m_ImageContent, and m_ShowSelector.
{ if(m_GUI) { m_FunctionalityComponentContainerGUI->m_ImageContent->setShown(visibility); } m_ShowSelector = visibility; }
void QmitkFunctionalityComponentContainer::SetShowTreeNodeSelector | ( | bool | show ) | [virtual] |
Method to set the Tree-Node-Selector visible or not as his parent group-box is set shown or not.
Definition at line 89 of file QmitkFunctionalityComponentContainer.cpp.
References GetImageContent().
{ GetImageContent()->setShown(show); }
void QmitkFunctionalityComponentContainer::SetWizardText | ( | const QString & | text ) |
Method to change the wizardText.
Method to create a textLabel at the Top of the wizard where a description can be created
Definition at line 505 of file QmitkFunctionalityComponentContainer.cpp.
References GetImageContent(), and m_GUI.
Referenced by CreateNavigationButtons().
{ //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setText(text); //m_FunctionalityComponentContainerGUI->GetWizardTextLabel()->setAlignment(Qt::WordBreak); GetImageContent()->updateGeometry(); GetImageContent()->repaint(); m_GUI->updateGeometry(); //m_GUI->layout()->AlignTop; m_GUI->layout()->activate(); m_GUI->repaint(); }
void QmitkFunctionalityComponentContainer::TreeChanged | ( | ) | [virtual, slot] |
The TreeChanged-slot-method updates the TreeNodeSelector if the datatree changes.
Reimplemented from QmitkBaseComponent.
Definition at line 139 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseComponent::m_AddedChildList, and UpdateDataTreeComboBoxes().
Referenced by Activated(), ImageSelected(), and TreeChanged().
{ UpdateDataTreeComboBoxes(); for(unsigned int i = 0; i < m_AddedChildList.size(); i++) { m_AddedChildList[i]->TreeChanged(); } }
void QmitkFunctionalityComponentContainer::TreeChanged | ( | const itk::EventObject & | treeChangedEvent ) | [virtual] |
Definition at line 128 of file QmitkFunctionalityComponentContainer.cpp.
References QmitkBaseComponent::IsActivated(), and TreeChanged().
{ if(IsActivated()) { TreeChanged(); } else TreeChanged(); }
void QmitkFunctionalityComponentContainer::UpdateDataTreeComboBoxes | ( | ) | [protected, virtual] |
Vector with all added components.
Method to update the content of all DataTreeComboBoxes.
Definition at line 150 of file QmitkFunctionalityComponentContainer.cpp.
Referenced by TreeChanged().
{ //if(GetTreeNodeSelector() != NULL) //{ // m_FunctionalityComponentContainerGUI->m_TreeNodeSelector->Update(); //} }
bool QmitkFunctionalityComponentContainer::m_Active [protected] |
Attribute whether the component is active or not.
image selected in MainSelector
iterator on current image
Definition at line 224 of file QmitkFunctionalityComponentContainer.h.
Referenced by QmitkThresholdComponent::Activated(), Activated(), QmitkThresholdComponent::DataObjectSelected(), QmitkThresholdComponent::Deactivated(), Deactivated(), and QmitkThresholdComponent::ShowThreshold().
Item on the actual selected Image in the TreeNodeSelector.
Reimplemented from QmitkBaseFunctionalityComponent.
Reimplemented in QmitkThresholdComponent.
Definition at line 230 of file QmitkFunctionalityComponentContainer.h.
Referenced by AddComponent(), GetDataStorage(), and SetDataStorage().
QWidget* QmitkFunctionalityComponentContainer::m_GUI [protected] |
Graphical User Interface for the component in general QWidget-Type.
Reimplemented from QmitkBaseComponent.
Definition at line 210 of file QmitkFunctionalityComponentContainer.h.
Referenced by AddComponent(), CreateNavigationButtons(), QmitkThresholdComponent::CreateQtPartControl(), CreateQtPartControl(), GetGUI(), SetSelectorVisibility(), and SetWizardText().
unsigned long QmitkFunctionalityComponentContainer::m_ObserverTag [protected] |
ObserverTag.
Definition at line 207 of file QmitkFunctionalityComponentContainer.h.
Item on the actual selected Image in the TreeNodeSelector.
Definition at line 227 of file QmitkFunctionalityComponentContainer.h.
Attribute to decide whether the selector shall be shown or not.
Definition at line 172 of file QmitkFunctionalityComponentContainer.h.
Referenced by QmitkThresholdComponent::CreateQtPartControl(), SetSelectorVisibility(), QmitkThresholdComponent::ShowImageContent(), and QmitkThresholdComponent::ShowThresholdFinderContent().
Attribute to decide whether the selector shall be updated when a parent-Selector is updatet or not.
Definition at line 169 of file QmitkFunctionalityComponentContainer.h.