36 #include <QApplication> 62 "AAAA/wAAAAD9AAAAAgAAAAAAAAGEAAADlvwCAAAACvsAAAAiAEMAbwBuAHQAZQB4AHQARABvAGMAawBXAGkAZABnAGUAdAEAAAMgAAAAWgAAAAAAAAAA+wAAADIASQBtAGEAZwBlAFAAcgBvAHAAZQByAHQAaQBlAHMARABvAGMAawBXAGkAZABnAGUAdAEAAAM0AAAAuwAAAAAAAAAA/AAAAEEAAAI7AAACAwEAAB36AAAAAAEAAAAV+wAAAEAAVgBvAGwAdQBtAGUAUAByAG8AcABlAHIAdABpAGUAcwBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGcAZQB0AQAAAAD/////AAABGQD////7AAAAPABNAGUAcwBoAFAAcgBvAHAAZQByAHQAaQBlAHMAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAEAAAAA/////wAAAP4A////+wAAADoAUABvAGkAbgB0AFMAYQBtAHAAbABpAG4AZwBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGcAZQB0AAAAAAD/////AAAAAAAAAAD7AAAAOgBDAGEAbQBlAHIAYQBDAG8AbgB0AHIAbwBsAFcAaQBkAGcAZQB0AEQAbwBjAGsAVwBpAGQAZwBlAHQAAAAAAP////8AAAAAAAAAAPsAAAAuAEkARwBUAEwAaQBuAGsAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAUEA////+wAAADgAVQBTAEEAYwBxAHUAcwBpAHQAaQBvAG4AVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAANQA////+wAAAEIAVAByAGEAYwBrAGUAZABDAGUAbgB0AGUAcgBsAGkAbgBlAFcAaQBkAGcAZQB0AEQAbwBjAGsAVwBpAGQAZwBlAHQAAAAAAP////8AAADDAP////sAAAA0AE4AYQB2AGkAZwBhAHQAaQBvAG4AVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAMEA////+wAAADIARgByAGEAbQBlAFQAcgBlAGUAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAGYA////+wAAADwAVABvAG8AbABQAHIAbwBwAGUAcgB0AGkAZQBzAFcAaQBkAGcAZQB0AEQAbwBjAGsAVwBpAGQAZwBlAHQBAAAAAP////8AAAGEAP////sAAABGAFIAZQBnAGkAcwB0AHIAYQB0AGkAbwBuAEgAaQBzAHQAbwByAHkAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAQIA////+wAAAEQAQwBhAGwAaQBiAHIAYQB0AGkAbwBuAE0AZQB0AGgAbwBkAHMAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAZMA////+wAAAEgAVgBpAHMAdQBhAGwAaQB6AGEAdABpAG8AbgBNAGUAdABoAG8AZABzAFcAaQBkAGcAZQB0AEQAbwBjAGsAVwBpAGQAZwBlAHQAAAAAAP////8AAAFMAP////sAAABGAFMAZQBnAG0AZQBuAHQAYQB0AGkAbwBuAE0AZQB0AGgAbwBkAHMAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAPEA////+wAAAEYAUgBlAGcAaQBzAHQAcgBhAHQAaQBvAG4ATQBlAHQAaABvAGQAcwBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGcAZQB0AAAAAAD/////AAABYgD////7AAAAPgBJAG0AYQBnAGUAUAByAG8AcABlAHIAdABpAGUAcwBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGcAZQB0AQAAAAD/////AAAA8AD////7AAAAFABEAG8AYwBrAFcAaQBkAGcAZQB0AAAAAAAAAAGBAAABSgD////7AAAALABNAGUAdAByAGkAYwBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGcAZQB0AAAAAAD/////AAAAZgD////7AAAALABFAHIAYQBzAGUAcgBXAGkAZABnAGUAdABEAG8AYwBrAFcAaQBkAGc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kAGcAZQB0AAAAAAD/////AAAAiAD///8AAAADAAAAAAAAAAD8AQAAAAH7AAAAMABQAGwAYQB5AGIAYQBjAGsAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAVMA////AAAF9gAAA5YAAAAEAAAABAAAAAgAAAAI/AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAACAAAACQAAAB4AVwBvAHIAawBmAGwAbwB3AFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAAAAAAAAAABYARABhAHQAYQBUAG8AbwBsAEIAYQByAQAAAOX/////AAAAAAAAAAAAAAAiAE4AYQB2AGkAZwBhAHQAaQBvAG4AVABvAG8AbABCAGEAcgEAAAGC/////wAAAAAAAAAAAAAAJgBDAGEAbQBlAHIAYQAzAEQAVgBpAGUAdwBUAG8AbwBsAEIAYQByAQAAAfv/////AAAAAAAAAAAAAAAWAFQAbwBvAGwAVABvAG8AbABCAGEAcgEAAAME/////wAAAAAAAAAAAAAAIgBTAGMAcgBlAGUAbgBzAGgAbwB0AFQAbwBvAGwAQgBhAHIBAAADWf////8AAAAAAAAAAAAAABwARABlAHMAawB0AG8AcABUAG8AbwBsAEIAYQByAQAAA4r/////AAAAAAAAAAAAAAAsAEkAbgB0AGUAcgBhAGMAdABvAHIAUwB0AHkAbABlAFQAbwBvAGwAQgBhAHIAAAAD3/////8AAAAAAAAAAAAAABYASABlAGwAcABUAG8AbwBsAEIAYQByAQAAA98AAAF4AAAAAAAAAAA=";
71 QStringList standardToolbars;
72 standardToolbars <<
"Workflow" <<
"Navigation" <<
"Tools" <<
"Screenshot" <<
"Desktop";
76 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
78 toolbars << standardToolbars <<
"Data" <<
"Help";
79 this->addToolbarsToDesktop(desktop, toolbars);
80 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
81 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
82 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
83 desktop.
addPreset(
"dicom_widget", Qt::LeftDockWidgetArea,
true);
84 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
85 desktop.
addPreset(
"help_widget", Qt::RightDockWidgetArea,
false);
86 mWorkflowDefaultDesktops[
"PatientDataUid"] = desktop;
90 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
92 toolbars << standardToolbars <<
"RegistrationHistory" <<
"Help";
93 this->addToolbarsToDesktop(desktop, toolbars);
94 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
true);
95 desktop.
addPreset(
"org_custusx_registration_gui_widget", Qt::LeftDockWidgetArea,
true);
96 desktop.
addPreset(
"registration_history_widget", Qt::LeftDockWidgetArea,
false);
97 mWorkflowDefaultDesktops[
"RegistrationUid"] = desktop;
101 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
103 toolbars << standardToolbars <<
"Camera3DViews" <<
"Sampler" <<
"Help";
104 this->addToolbarsToDesktop(desktop, toolbars);
105 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
106 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
107 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
108 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
109 mWorkflowDefaultDesktops[
"PreOpPlanningUid"] = desktop;
113 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
115 toolbars << standardToolbars <<
"InteractorStyle" <<
"ToolOffset" <<
"Help";
116 this->addToolbarsToDesktop(desktop, toolbars);
117 mWorkflowDefaultDesktops[
"NavigationUid"] = desktop;
121 desktop =
Desktop(
"LAYOUT_US_Acquisition", QByteArray::fromBase64(
""));
123 toolbars << standardToolbars <<
"Help";
124 this->addToolbarsToDesktop(desktop, toolbars);
125 desktop.
addPreset(
"igt_link_widget", Qt::LeftDockWidgetArea,
true);
126 desktop.
addPreset(
"us_reconstruction", Qt::LeftDockWidgetArea,
true);
127 desktop.
addPreset(
"org_custusx_acquisition_widgets_acquisition", Qt::LeftDockWidgetArea,
true);
128 mWorkflowDefaultDesktops[
"IntraOpImagingUid"] = desktop;
132 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
134 toolbars << standardToolbars <<
"Sampler" <<
"Help";
135 this->addToolbarsToDesktop(desktop, toolbars);
136 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
137 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
138 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
139 desktop.
addPreset(
"metric_widget", Qt::LeftDockWidgetArea,
true);
140 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
141 desktop.
addPreset(
"playback_widget", Qt::BottomDockWidgetArea,
false);
142 mWorkflowDefaultDesktops[
"PostOpControllUid"] = desktop;
146 void ApplicationsParser::addToolbarsToDesktop(
Desktop& desktop, QStringList toolbars)
148 for (
int i=0; i<toolbars.size(); ++i)
150 desktop.
addPreset(toolbars[i]+
"ToolBar", Qt::TopToolBarArea);
154 void ApplicationsParser::addDefaultDesktops(QString workflowStateUid, QString layoutUid, QString mainwindowstate)
156 mWorkflowDefaultDesktops[workflowStateUid] =
Desktop(layoutUid,
157 QByteArray::fromBase64(mainwindowstate.toLatin1()));
163 if (!mWorkflowDefaultDesktops.count(workflowName))
164 return mWorkflowDefaultDesktops[
"DEFAULT"];
165 return mWorkflowDefaultDesktops[workflowName];
173 QDomElement desktopElement;
174 if (workflowElement.namedItem(
"custom").isNull())
180 desktopElement = workflowElement.namedItem(
"custom").toElement();
182 retval.
mMainWindowState = QByteArray::fromBase64(desktopElement.attribute(
"mainwindowstate").toLatin1());
183 retval.
mLayoutUid = desktopElement.attribute(
"layoutuid");
195 desktopElement.setAttribute(
"mainwindowstate", QString(desktop.
mMainWindowState.toBase64()));
196 desktopElement.setAttribute(
"layoutuid", desktop.
mLayoutUid);
204 retval = retval.
descend(
"workflows");
213 workflowElement.removeChild(workflowElement.namedItem(
"custom"));
ProfilePtr activeProfile()
void setDesktop(QString workflowName, Desktop desktop)
static ProfileManager * getInstance(QString defaultProfile=QString("Laboratory"))
returns the only instance of this class
QDomElement getElement()
return the current element
void resetDesktop(QString workflowName)
QByteArray mMainWindowState
Data class for CustusX desktop.
void save()
save entire document.
QString mSecondaryLayoutUid
Desktop getDefaultDesktop(QString workflowName)
void addPreset(QString name, int pos, bool tabbed=true)
Helper class for xml files used to store ssc/cx data.
Desktop getDesktop(QString workflowName)
XmlOptionFile descend(QString element) const
step one level down in the xml tree
Namespace for all CustusX production code.