15 #include <QApplication> 41 "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kAGcAZQB0AAAAAAD/////AAAAiAD///8AAAADAAAAAAAAAAD8AQAAAAH7AAAAMABQAGwAYQB5AGIAYQBjAGsAVwBpAGQAZwBlAHQARABvAGMAawBXAGkAZABnAGUAdAAAAAAA/////wAAAVMA////AAAF9gAAA5YAAAAEAAAABAAAAAgAAAAI/AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAACAAAACQAAAB4AVwBvAHIAawBmAGwAbwB3AFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAAAAAAAAAABYARABhAHQAYQBUAG8AbwBsAEIAYQByAQAAAOX/////AAAAAAAAAAAAAAAiAE4AYQB2AGkAZwBhAHQAaQBvAG4AVABvAG8AbABCAGEAcgEAAAGC/////wAAAAAAAAAAAAAAJgBDAGEAbQBlAHIAYQAzAEQAVgBpAGUAdwBUAG8AbwBsAEIAYQByAQAAAfv/////AAAAAAAAAAAAAAAWAFQAbwBvAGwAVABvAG8AbABCAGEAcgEAAAME/////wAAAAAAAAAAAAAAIgBTAGMAcgBlAGUAbgBzAGgAbwB0AFQAbwBvAGwAQgBhAHIBAAADWf////8AAAAAAAAAAAAAABwARABlAHMAawB0AG8AcABUAG8AbwBsAEIAYQByAQAAA4r/////AAAAAAAAAAAAAAAsAEkAbgB0AGUAcgBhAGMAdABvAHIAUwB0AHkAbABlAFQAbwBvAGwAQgBhAHIAAAAD3/////8AAAAAAAAAAAAAABYASABlAGwAcABUAG8AbwBsAEIAYQByAQAAA98AAAF4AAAAAAAAAAA=";
50 QStringList standardToolbars;
51 standardToolbars <<
"Workflow" <<
"Navigation" <<
"Tools" <<
"Screenshot" <<
"Desktop";
55 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
57 toolbars << standardToolbars <<
"Data" <<
"Help";
58 this->addToolbarsToDesktop(desktop, toolbars);
59 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
60 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
61 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
62 desktop.
addPreset(
"dicom_widget", Qt::LeftDockWidgetArea,
true);
63 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
64 desktop.
addPreset(
"help_widget", Qt::RightDockWidgetArea,
false);
65 mWorkflowDefaultDesktops[
"PatientDataUid"] = desktop;
69 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
71 toolbars << standardToolbars <<
"RegistrationHistory" <<
"Help";
72 this->addToolbarsToDesktop(desktop, toolbars);
73 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
true);
74 desktop.
addPreset(
"org_custusx_registration_gui_widget", Qt::LeftDockWidgetArea,
true);
75 desktop.
addPreset(
"registration_history_widget", Qt::LeftDockWidgetArea,
false);
76 mWorkflowDefaultDesktops[
"RegistrationUid"] = desktop;
80 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
82 toolbars << standardToolbars <<
"Camera3DViews" <<
"Sampler" <<
"Help";
83 this->addToolbarsToDesktop(desktop, toolbars);
84 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
85 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
86 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
87 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
88 mWorkflowDefaultDesktops[
"PreOpPlanningUid"] = desktop;
92 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
94 toolbars << standardToolbars <<
"InteractorStyle" <<
"ToolOffset" <<
"Help";
95 this->addToolbarsToDesktop(desktop, toolbars);
96 mWorkflowDefaultDesktops[
"NavigationUid"] = desktop;
100 desktop =
Desktop(
"LAYOUT_US_Acquisition", QByteArray::fromBase64(
""));
102 toolbars << standardToolbars <<
"Help";
103 this->addToolbarsToDesktop(desktop, toolbars);
104 desktop.
addPreset(
"igt_link_widget", Qt::LeftDockWidgetArea,
true);
105 desktop.
addPreset(
"us_reconstruction", Qt::LeftDockWidgetArea,
true);
106 desktop.
addPreset(
"org_custusx_acquisition_widgets_acquisition", Qt::LeftDockWidgetArea,
true);
107 mWorkflowDefaultDesktops[
"IntraOpImagingUid"] = desktop;
111 desktop =
Desktop(
"LAYOUT_3D_ACS", QByteArray::fromBase64(
""));
113 toolbars << standardToolbars <<
"Sampler" <<
"Help";
114 this->addToolbarsToDesktop(desktop, toolbars);
115 desktop.
addPreset(
"active_mesh_widget", Qt::LeftDockWidgetArea,
true);
116 desktop.
addPreset(
"volume_properties_widget", Qt::LeftDockWidgetArea,
true);
117 desktop.
addPreset(
"slice_properties_widget", Qt::LeftDockWidgetArea,
true);
118 desktop.
addPreset(
"metric_widget", Qt::LeftDockWidgetArea,
true);
119 desktop.
addPreset(
"console_widget", Qt::LeftDockWidgetArea,
false);
120 desktop.
addPreset(
"playback_widget", Qt::BottomDockWidgetArea,
false);
121 mWorkflowDefaultDesktops[
"PostOpControllUid"] = desktop;
125 void ApplicationsParser::addToolbarsToDesktop(
Desktop& desktop, QStringList toolbars)
127 for (
int i=0; i<toolbars.size(); ++i)
129 desktop.
addPreset(toolbars[i]+
"ToolBar", Qt::TopToolBarArea);
133 void ApplicationsParser::addDefaultDesktops(QString workflowStateUid, QString layoutUid, QString mainwindowstate)
135 mWorkflowDefaultDesktops[workflowStateUid] =
Desktop(layoutUid,
136 QByteArray::fromBase64(mainwindowstate.toLatin1()));
142 if (!mWorkflowDefaultDesktops.count(workflowName))
143 return mWorkflowDefaultDesktops[
"DEFAULT"];
144 return mWorkflowDefaultDesktops[workflowName];
152 QDomElement desktopElement;
153 if (workflowElement.namedItem(
"custom").isNull())
159 desktopElement = workflowElement.namedItem(
"custom").toElement();
161 retval.
mMainWindowState = QByteArray::fromBase64(desktopElement.attribute(
"mainwindowstate").toLatin1());
162 retval.
mLayoutUid = desktopElement.attribute(
"layoutuid");
174 desktopElement.setAttribute(
"mainwindowstate", QString(desktop.
mMainWindowState.toBase64()));
175 desktopElement.setAttribute(
"layoutuid", desktop.
mLayoutUid);
183 retval = retval.
descend(
"workflows");
192 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.