Verified Commit d70d2e4c authored by Tobias WEBER's avatar Tobias WEBER
Browse files

some gui tweaks

parent 92ecaac1
......@@ -1787,7 +1787,6 @@ void PathsBuilder::RemovePathLoops(std::vector<t_vec2>& path_vertices, bool deg,
{
min_idx = path_indices[peak_min_idx];
min_dist_to_start = dists[peak_min_idx];
std::cout << "min " << std::endl;
minimum_found = true;
}
}
......
......@@ -1331,15 +1331,47 @@ PathsTool::PathsTool(QWidget* pParent) : QMainWindow{pParent}
// view menu
QMenu *menuView = new QMenu("View", m_menubar);
QAction *acHideAllDocks = new QAction("Hide All", menuFile);
QAction *acShowAllDocks = new QAction("Show All", menuFile);
menuView->addAction(m_tasProperties->toggleViewAction());
menuView->addAction(m_xtalProperties->toggleViewAction());
menuView->addAction(m_xtalInfos->toggleViewAction());
menuView->addAction(m_coordProperties->toggleViewAction());
menuView->addAction(m_pathProperties->toggleViewAction());
menuView->addAction(m_camProperties->toggleViewAction());
//menuView->addSeparator();
menuView->addSeparator();
menuView->addAction(acHideAllDocks);
menuView->addAction(acShowAllDocks);
//menuView->addAction(acPersp);
// connections
connect(acHideAllDocks, &QAction::triggered, [this]() -> void
{
for(QDockWidget* dock : std::initializer_list<QDockWidget*>
{
m_tasProperties.get(), m_xtalProperties.get(),
m_xtalInfos.get(), m_coordProperties.get(),
m_pathProperties.get(), m_camProperties.get()
})
{
dock->hide();
}
});
connect(acShowAllDocks, &QAction::triggered, [this]() -> void
{
for(QDockWidget* dock : std::initializer_list<QDockWidget*>
{
m_tasProperties.get(), m_xtalProperties.get(),
m_xtalInfos.get(), m_coordProperties.get(),
m_pathProperties.get(), m_camProperties.get()
})
{
dock->show();
}
});
// geometry menu
QMenu *menuGeo = new QMenu("Geometry", m_menubar);
......
......@@ -77,7 +77,7 @@ PathPropertiesWidget::PathPropertiesWidget(QWidget *parent)
m_sliderPath->setToolTip("Path tracking.");
m_btnGo = new QToolButton(this);
SetGoButtonText(true);
m_btnGo->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_btnGo->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
// TODO: change the label "monochromator" to "analyser" for ki=const mode
const char* labels[] = {"Monochromator:", "Sample:"};
......@@ -108,9 +108,9 @@ PathPropertiesWidget::PathPropertiesWidget(QWidget *parent)
int y = 0;
layoutPath->addWidget(m_btnCalcMesh, y++, 0, 1, 3);
layoutPath->addWidget(m_btnCalcPath, y++, 0, 1, 3);
layoutPath->addWidget(m_btnCalcPath, y, 0, 1, 2);
layoutPath->addWidget(m_btnGo, y++, 2, 2, 1);
layoutPath->addWidget(m_sliderPath, y, 0, 1, 2);
layoutPath->addWidget(m_btnGo, y++, 2, 1, 1);
}
auto *grid = new QGridLayout(this);
......
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