Skip to content

Commit

Permalink
Auto hide annotations/roi
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Glowacki committed Jun 28, 2024
1 parent 2433a17 commit d2bd465
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/gstar/AbstractImageWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,15 @@ QLayout* AbstractImageWidget::generateDefaultLayout(bool add_tab_widget)
splitter->setOrientation(Qt::Horizontal);

splitter->addWidget(m_imageViewWidget);
splitter->setStretchFactor(0, 1);
if (add_tab_widget)
{
splitter->setStretchFactor(0, 1);
splitter->addWidget(m_tabWidget);
//_anim_widget = new AnnimateSlideWidget();
//_anim_widget->setAnimWidget(m_tabWidget, "<");
splitter->addWidget(m_tabWidget);
splitter->setStretchFactor(1, 1);
//splitter->setCollapsible(0, false);
//splitter->setCollapsible(1, true);
}
createToolBar(m_imageViewWidget);

Expand Down
3 changes: 3 additions & 0 deletions src/gstar/AbstractImageWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "gstar/ImageViewToolBar.h"
#include "gstar/RangeWidget.h"
#include "gstar/RulerUnitsDialog.h"
#include "mvc/AnnimateSlideWidget.h"

//---------------------------------------------------------------------------

Expand Down Expand Up @@ -414,6 +415,8 @@ protected slots:
*/
QWidget* m_treeTabWidget;

AnnimateSlideWidget* _anim_widget;

};

}
Expand Down
8 changes: 7 additions & 1 deletion src/mvc/MapsElementsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,17 @@ void MapsElementsWidget::_createLayout(bool create_image_nav, bool restore_float
//hbox2->addWidget(_dataset_name);
hbox2->addItem(new QSpacerItem(9999, 40, QSizePolicy::Maximum));


_anim_widget = new AnnimateSlideWidget();
_anim_widget->setAnimWidget(m_tabWidget, "<");

QSplitter* splitter = new QSplitter();
splitter->setOrientation(Qt::Horizontal);
splitter->addWidget(m_imageViewWidget);
splitter->setStretchFactor(0, 1);
splitter->addWidget(m_tabWidget);
splitter->addWidget(_anim_widget);
splitter->setCollapsible(0, false);
splitter->setCollapsible(1, true);

createToolBar(m_imageViewWidget, create_image_nav);

Expand Down

0 comments on commit d2bd465

Please sign in to comment.