00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2008-09-12 15:46:48 +0200 (Fr, 12 Sep 2008) $ 00006 Version: $Revision: 15236 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef QmitkNewSegmentationDialog_h_Included 00019 #define QmitkNewSegmentationDialog_h_Included 00020 00021 #include "mitkColorProperty.h" 00022 #include "QmitkExtExports.h" 00023 00024 #include <qdialog.h> 00025 00026 #include <QCompleter> 00027 00028 class QLabel; 00029 class QLineEdit; 00030 class Q3ListBox; 00031 class QPushButton; 00032 00033 #include <mitkCommon.h> 00034 00047 class QmitkExt_EXPORT QmitkNewSegmentationDialog : public QDialog 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 00053 QmitkNewSegmentationDialog(QWidget* parent = 0); 00054 00055 virtual ~QmitkNewSegmentationDialog(); 00056 00057 const QString GetSegmentationName(); 00058 const char* GetOrganType(); 00059 mitk::Color GetColor(); 00060 00061 void SetSuggestionList(QStringList organColorList); 00062 00063 signals: 00064 00065 public slots: 00066 00067 void setPrompt( const QString& prompt ); 00068 void setSegmentationName( const QString& name ); 00069 00070 protected slots: 00071 00072 void onAcceptClicked(); 00073 void onNewOrganNameChanged(const QString&); 00074 void onColorBtnClicked(); 00075 void onColorChange(const QString& completedWord); 00076 00077 protected: 00078 00079 QLabel* lblPrompt; 00080 Q3ListBox* lstOrgans; 00081 QLineEdit* edtName; 00082 00083 QPushButton* btnColor; 00084 QPushButton* btnOk; 00085 00086 QLineEdit* edtNewOrgan; 00087 00088 QString selectedOrgan; 00089 00090 bool newOrganEntry; 00091 00092 QColor m_Color; 00093 00094 QCompleter* completer; 00095 00096 QString m_SegmentationName; 00097 00098 QStringList organList; 00099 QList<QColor> colorList; 00100 }; 00101 00102 #endif 00103