Skip to content

Commit

Permalink
ENH: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Punzo committed Jan 22, 2024
1 parent f225387 commit 4cbf624
Show file tree
Hide file tree
Showing 8 changed files with 594 additions and 215 deletions.
7 changes: 3 additions & 4 deletions Libs/DICOM/Core/ctkDICOMScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,11 @@ void ctkDICOMScheduler::stopJobsByJobUIDs(const QStringList &jobUIDs)
}

//----------------------------------------------------------------------------
void ctkDICOMScheduler::retryJobsByJobUIDs(const QMap<QString, ctkDICOMJobDetail> &jobUIDs)
void ctkDICOMScheduler::runJobs(const QMap<QString, ctkDICOMJobDetail> &jobDetails)
{
Q_D(ctkDICOMScheduler);
for(QString jobUID : jobUIDs.keys())
for(QString jobUID : jobDetails.keys())
{
ctkDICOMJobDetail jd = jobUIDs.value(jobUID);
ctkDICOMJobDetail jd = jobDetails.value(jobUID);
if (jd.JobClass == "ctkDICOMQueryJob")
{
switch (jd.DICOMLevel)
Expand Down
2 changes: 1 addition & 1 deletion Libs/DICOM/Core/ctkDICOMScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class CTK_DICOM_CORE_EXPORT ctkDICOMScheduler : public ctkJobScheduler
const QStringList& seriesInstanceUIDs = {},
const QStringList& sopInstanceUIDs = {});
Q_INVOKABLE void stopJobsByJobUIDs(const QStringList& jobUIDs);
Q_INVOKABLE void retryJobsByJobUIDs(const QMap<QString, ctkDICOMJobDetail>& jobUIDs);
Q_INVOKABLE void runJobs(const QMap<QString, ctkDICOMJobDetail>& jobDetails);
Q_INVOKABLE void raiseJobsPriorityForSeries(const QStringList& selectedSeriesInstanceUIDs,
QThread::Priority priority = QThread::HighestPriority);
///@}
Expand Down
1 change: 1 addition & 0 deletions Libs/DICOM/Widgets/Resources/UI/Icons/cleaning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Libs/DICOM/Widgets/Resources/UI/Icons/reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
216 changes: 138 additions & 78 deletions Libs/DICOM/Widgets/Resources/UI/ctkDICOMJobListWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,34 @@
<rect>
<x>0</x>
<y>0</y>
<width>505</width>
<height>350</height>
<width>816</width>
<height>498</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QGridLayout" name="WidgetGridLayout">
<item row="1" column="0">
<widget class="ctkCollapsibleGroupBox" name="DetailsCollapsibleGroupBox">
<property name="title">
<string>Details</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextBrowser" name="DetailsTextBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QTableView" name="JobsView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
Expand All @@ -24,8 +44,11 @@
<property name="showGrid">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>100</number>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>200</number>
<number>150</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
Expand All @@ -35,31 +58,8 @@
</attribute>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
<item>
<widget class="ctkPushButton" name="StopButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Stop selected in-progress jobs.</string>
</property>
<property name="text">
<string>Stop</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/stop.svg</normaloff>:/Icons/stop.svg</iconset>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="2">
<layout class="QVBoxLayout" name="FiltersVerticalLayout">
<item>
<widget class="ctkPushButton" name="RetryButton">
<property name="sizePolicy">
Expand All @@ -81,63 +81,134 @@
</widget>
</item>
<item>
<widget class="ctkPushButton" name="ShowCompletedButton">
<widget class="ctkPushButton" name="StopButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>All the completed jobs will be hidden if unchecked.</string>
<string>Stop selected in-progress jobs.</string>
</property>
<property name="text">
<string>Show all</string>
<string>Stop</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/visible_on.svg</normaloff>:/Icons/visible_on.svg</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
<normaloff>:/Icons/stop.svg</normaloff>:/Icons/stop.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="ctkPushButton" name="ClearCompletedButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear all failed and completed jobs.</string>
</property>
<property name="text">
<string>Clear</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/delete.svg</normaloff>:/Icons/delete.svg</iconset>
</property>
<widget class="ctkCollapsibleGroupBox" name="FiltersCollapsibleGroupBox">
<property name="title">
<string>Filters</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="FilterLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="ctkComboBox" name="FilterColumnComboBox"/>
</item>
<item row="2" column="1" colspan="3">
<widget class="ctkPushButton" name="ShowCompletedButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Show completed jobs.</string>
</property>
<property name="text">
<string>Show completed</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/visible_on.svg</normaloff>:/Icons/visible_on.svg</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="ctkPushButton" name="ResetFiltersPushButton">
<property name="toolTip">
<string>Reset all filters to default.</string>
</property>
<property name="text">
<string>Reset filters</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/reset.svg</normaloff>:/Icons/reset.svg</iconset>
</property>
</widget>
</item>
<item row="4" column="1" colspan="3">
<widget class="ctkPushButton" name="ClearCompletedButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear all completed jobs.</string>
</property>
<property name="text">
<string>Clear completed</string>
</property>
<property name="icon">
<iconset resource="ctkDICOMWidget.qrc">
<normaloff>:/Icons/cleaning.svg</normaloff>:/Icons/cleaning.svg</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
<height>40</height>
</size>
</property>
</spacer>
Expand All @@ -146,26 +217,15 @@
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="FilterLabel">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="FilterLineEdit"/>
</item>
<item>
<widget class="ctkComboBox" name="ColumnComboBox"/>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ctkCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
<header>ctkCollapsibleGroupBox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ctkComboBox</class>
<extends>QComboBox</extends>
Expand Down
2 changes: 2 additions & 0 deletions Libs/DICOM/Widgets/Resources/UI/ctkDICOMWidget.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
<file>Icons/retry.svg</file>
<file>Icons/error.svg</file>
<file>Icons/pending.svg</file>
<file>Icons/cleaning.svg</file>
<file>Icons/reset.svg</file>
</qresource>
</RCC>
Loading

0 comments on commit 4cbf624

Please sign in to comment.