]> Creatis software - clitk.git/commitdiff
Settings dialog to add new dicom server
authorcervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Fri, 5 Jul 2013 12:19:47 +0000 (14:19 +0200)
committercervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Fri, 5 Jul 2013 12:19:47 +0000 (14:19 +0200)
vv/qt_ui/vvPacsSettingsDialog.ui [new file with mode: 0644]
vv/vvPacsSettingsDialog.cxx [new file with mode: 0644]
vv/vvPacsSettingsDialog.h [new file with mode: 0644]

diff --git a/vv/qt_ui/vvPacsSettingsDialog.ui b/vv/qt_ui/vvPacsSettingsDialog.ui
new file mode 100644 (file)
index 0000000..a64e15d
--- /dev/null
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>vvPacsSettingsDialog</class>
+ <widget class="QDialog" name="vvPacsSettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>201</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>PACS settings</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>160</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>20</y>
+     <width>361</width>
+     <height>120</height>
+    </rect>
+   </property>
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="QLabel" name="label_ID_3">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>Name</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="1">
+     <widget class="QLineEdit" name="NameEdit"/>
+    </item>
+    <item row="1" column="1">
+     <widget class="QLineEdit" name="AETitleEdit"/>
+    </item>
+    <item row="2" column="0">
+     <widget class="QLabel" name="label_ID_4">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>Adress</string>
+      </property>
+     </widget>
+    </item>
+    <item row="2" column="1">
+     <widget class="QLineEdit" name="AdressEdit"/>
+    </item>
+    <item row="3" column="0">
+     <widget class="QLabel" name="label_ID_5">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>Port</string>
+      </property>
+     </widget>
+    </item>
+    <item row="3" column="1">
+     <widget class="QLineEdit" name="PortEdit"/>
+    </item>
+    <item row="1" column="0">
+     <widget class="QLabel" name="label_ID_2">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>AE Title</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>vvPacsSettingsDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>vvPacsSettingsDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/vv/vvPacsSettingsDialog.cxx b/vv/vvPacsSettingsDialog.cxx
new file mode 100644 (file)
index 0000000..7cde608
--- /dev/null
@@ -0,0 +1,19 @@
+#include "vvPacsSettingsDialog.h"      
+#include "vvQPacsConnection.h"
+#include "vvUtils.h"
+
+vvPacsSettingsDialog::vvPacsSettingsDialog(QWidget *i_parent)
+               : QDialog(i_parent)
+       {
+               mparent = i_parent;
+               ui.setupUi(this);
+               update();
+       }
+
+void vvPacsSettingsDialog::accept()
+{
+
+       AddDicomServer(ui.NameEdit->text().toStdString(),ui.AETitleEdit->text().toStdString(),ui.AdressEdit->text().toStdString(), ui.PortEdit->text().toStdString());
+((vvQPacsConnection*)this->parent())->refreshNetworks();
+       close();
+}
\ No newline at end of file
diff --git a/vv/vvPacsSettingsDialog.h b/vv/vvPacsSettingsDialog.h
new file mode 100644 (file)
index 0000000..48f3f48
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __vvPacsSettingsDialog_H
+#define __vvPacsSettingsDialog_H
+#include "ui_vvPacsSettingsDialog.h"
+#include <QFileDialog>
+#include <QTGUI/QWidget>
+
+ class vvPacsSettingsDialog : public QDialog 
+  {
+         Q_OBJECT
+  public:
+         
+         vvPacsSettingsDialog(QWidget *parent=0);
+    
+         ~vvPacsSettingsDialog(){}
+  private:
+         QWidget *mparent;
+         Ui::vvPacsSettingsDialog ui;
+private slots:
+       void accept();
+
+ };
+#endif //__vvPacsSettingsDialog_H
\ No newline at end of file