BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
JobViewActivities Namespace Reference

Description

The JobViewActivities namespace is a helper to get info related to JobView activities.

Functions

QVector< JobViewFlags::Dock > activeDocks (JobViewActivity activity)
 Returns vector of JobView's dockId which have to be shown for given activity. More...
 
QList< JobViewActivityall ()
 Returns list of all available activities. More...
 
QString name (JobViewActivity activity)
 Returns name of activity. More...
 

Function Documentation

◆ activeDocks()

QVector< JobViewFlags::Dock > JobViewActivities::activeDocks ( JobViewActivity  activity)

Returns vector of JobView's dockId which have to be shown for given activity.

Definition at line 63 of file JobViewActivities.cpp.

64 {
65  QMap<JobViewActivity, QVector<JobViewFlags::Dock>>::const_iterator it =
66  activityToDocks.find(activity);
67  ASSERT(it != activityToDocks.end());
68  return it.value();
69 }

Referenced by JobView::setActivity().

◆ all()

QList< JobViewActivity > JobViewActivities::all ( )

Returns list of all available activities.

Definition at line 47 of file JobViewActivities.cpp.

48 {
49  return activityNames.keys();
50 }

Referenced by JobView::createActions().

◆ name()

QString JobViewActivities::name ( JobViewActivity  activity)

Returns name of activity.

Definition at line 54 of file JobViewActivities.cpp.

55 {
56  QMap<JobViewActivity, QString>::const_iterator it = activityNames.find(activity);
57  ASSERT(it != activityNames.end());
58  return it.value();
59 }

Referenced by JobView::createActions().