Commit 8d865a07 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED code cleaning

parent 78d67341
......@@ -145,13 +145,13 @@ void MeshComponent::init() {
// build the selection widget
auto* hbox = new QVBoxLayout(selectionWidget);
auto* selectionToolBar = new QToolBar(selectionWidget);
selectionToolBar->addAction(removeSelections);
selectionToolBar->addAction(mergeSelection);
selectionToolBar->addAction(inspectSelection);
selectionToolBar->addWidget(insertionPolicyBox);
auto* selectionToolbar = new QToolBar(selectionWidget);
selectionToolbar->addAction(removeSelections);
selectionToolbar->addAction(mergeSelection);
selectionToolbar->addAction(inspectSelection);
selectionToolbar->addWidget(insertionPolicyBox);
hbox->addWidget(selectionView);
hbox->addWidget(selectionToolBar);
hbox->addWidget(selectionToolbar);
selectionWidget->setLayout(hbox);
// data widget
......@@ -200,13 +200,13 @@ void MeshComponent::init() {
// build the data widget
auto* dataBox = new QVBoxLayout(dataWidget);
auto* dataToolBar = new QToolBar(dataWidget);
dataToolBar->addAction(removeData);
dataToolBar->addAction(inspectData);
dataToolBar->addWidget(displayTypePolicyBox);
dataToolBar->addWidget(vectorRepresentationPolicyBox);
auto* dataToolbar = new QToolBar(dataWidget);
dataToolbar->addAction(removeData);
dataToolbar->addAction(inspectData);
dataToolbar->addWidget(displayTypePolicyBox);
dataToolbar->addWidget(vectorRepresentationPolicyBox);
dataBox->addWidget(dataView);
dataBox->addWidget(dataToolBar);
dataBox->addWidget(dataToolbar);
dataWidget->setLayout(dataBox);
}
......
......@@ -206,7 +206,7 @@ InteractiveViewer::InteractiveViewer(QString& name, ViewerType type) : Viewer(na
//-- create the slice slider if needed
viewerMenu = nullptr;
viewerToolBar = nullptr;
viewerToolbar = nullptr;
screenshotActionMenu = nullptr;
displayedTopLevelComponents = 0;
......@@ -214,14 +214,12 @@ InteractiveViewer::InteractiveViewer(QString& name, ViewerType type) : Viewer(na
pickingEffectIsSelecting = true; // default effect
isPicking = false; // by default, viewer is not picking
if (myType == SLICE_VIEWER)
if (myType == SLICE_VIEWER) {
// by default, the 2D scenes are set to pick slice pixels
{
initPicking(InteractiveViewer::PIXEL_PICKING);
}
else
else {
// no picking
{
initPicking(InteractiveViewer::NO_PICKING);
}
......@@ -246,8 +244,8 @@ InteractiveViewer::~InteractiveViewer() {
delete viewerMenu;
viewerMenu = nullptr;
delete viewerToolBar;
viewerToolBar = nullptr;
delete viewerToolbar;
viewerToolbar = nullptr;
delete frame;
frame = nullptr;
......@@ -474,9 +472,7 @@ QWidget* InteractiveViewer::getWidget(QWidget* parent) {
else {
if (frame->parentWidget() != parent) {
bool isVisible = frame->isVisible();
//frame->parentWidget()->layout()->removeWidget(frame);
frame->setParent(parent);
//parent->layout()->addWidget(frame);
frame->setVisible(isVisible);
}
}
......@@ -763,37 +759,36 @@ QMenu* InteractiveViewer::getMenu() {
// ---------------------- getToolBar ----------------------------
QToolBar* InteractiveViewer::getToolBar() {
if (frame && !viewerToolBar) {
if (frame && !viewerToolbar) {
if (myType == GEOMETRY_VIEWER) {
viewerToolBar = new QToolBar(objectName() + " ToolBar");
viewerToolbar = new QToolBar(objectName() + " Toolbar");
// ensure object name is set for saving the state
viewerToolBar->setObjectName(objectName() + " ToolBar");
viewerToolbar->setObjectName(objectName() + " Toolbar");
viewerToolBar->addAction(pickPointAction);
viewerToolBar->addAction(pickCellAction);
viewerToolBar->addAction(pickPointRegionAction);
viewerToolBar->addAction(pickCellRegionAction);
viewerToolbar->addAction(pickPointAction);
viewerToolbar->addAction(pickCellAction);
viewerToolbar->addAction(pickPointRegionAction);
viewerToolbar->addAction(pickCellRegionAction);
viewerToolBar->addSeparator();
viewerToolbar->addSeparator();
viewerToolBar->addAction(surfaceAction);
viewerToolBar->addAction(wireframeAction);
viewerToolBar->addAction(pointsAction);
viewerToolbar->addAction(surfaceAction);
viewerToolbar->addAction(wireframeAction);
viewerToolbar->addAction(pointsAction);
if (colorAction) {
viewerToolBar->addAction(colorAction);
viewerToolbar->addAction(colorAction);
}
viewerToolBar->addAction(glyphAction);
viewerToolBar->addAction(toggleLabelAction);
viewerToolBar->addSeparator();
viewerToolbar->addAction(glyphAction);
viewerToolbar->addAction(toggleLabelAction);
viewerToolBar->addAction(toggleAxesAction);
viewerToolbar->addSeparator();
viewerToolBar->addAction(screenshotAction);
viewerToolbar->addAction(toggleAxesAction);
viewerToolbar->addAction(screenshotAction);
viewerToolBar->addSeparator();
viewerToolbar->addSeparator();
viewerToolBar->addAction(scalarDataColorAction);
viewerToolbar->addAction(scalarDataColorAction);
}
/* if (myType == SLICE_VIEWER) {
viewerToolBar->addAction(toggleOrientationDecorationsAction);
......@@ -801,7 +796,7 @@ QToolBar* InteractiveViewer::getToolBar() {
*/
}
return viewerToolBar;
return viewerToolbar;
}
// ---------------------- initActions ----------------------------
......@@ -854,7 +849,7 @@ void InteractiveViewer::initActions() {
scalarDataModel = new MeshDataFilterModel(MeshComponent::POINTS | MeshComponent::CELLS, MeshComponent::SCALARS, this);
// combo box for viewing the scalar data model
scalarDataComboBox = new QComboBox(viewerToolBar);
scalarDataComboBox = new QComboBox(viewerToolbar);
scalarDataComboBox->setModel(scalarDataModel);
scalarDataComboBox->setMinimumWidth(150);
......
......@@ -436,7 +436,7 @@ protected:
QMenu* viewerMenu;
/// the QToolBar for the InteractiveViewer
QToolBar* viewerToolBar;
QToolBar* viewerToolbar;
/// the ComboBox for mesh scalar data
QComboBox* scalarDataComboBox;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment