Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef OPENMS_VISUAL_METADATABROWSER_H
00036 #define OPENMS_VISUAL_METADATABROWSER_H
00037
00038 #include <OpenMS/KERNEL/MSExperiment.h>
00039 #include <OpenMS/KERNEL/FeatureMap.h>
00040 #include <OpenMS/KERNEL/ConsensusMap.h>
00041
00042
00043 #include <QtGui/QDialog>
00044 #include <QtGui/QTreeWidget>
00045 class QTreeWidgetItem;
00046 class QPushButton;
00047 class QStackedWidget;
00048 class QHBoxLayout;
00049 class QVBoxLayout;
00050 class QGridLayout;
00051
00052 namespace OpenMS
00053 {
00054 class BaseVisualizerGUI;
00055 class Acquisition;
00056 class AcquisitionInfo;
00057 class ContactPerson;
00058 class Digestion;
00059 class ExperimentalSettings;
00060 class Gradient;
00061 class HPLC;
00062 class PeptideIdentification;
00063 class Instrument;
00064 class IonDetector;
00065 class IonSource;
00066 class MassAnalyzer;
00067 class MetaInfo;
00068 class MetaInfoDescription;
00069 class MetaInfoInterface;
00070 class MetaInfoRegistry;
00071 class Modification;
00072 class PeptideHit;
00073 class Precursor;
00074 class DataProcessing;
00075 class ProteinHit;
00076 class ProteinIdentification;
00077 class Sample;
00078 class SampleTreatment;
00079 class Software;
00080 class SourceFile;
00081 class SpectrumSettings;
00082 class Tagging;
00083 class DocumentIdentifier;
00084 class Product;
00085
00101 class OPENMS_GUI_DLLAPI MetaDataBrowser :
00102 public QDialog
00103 {
00104 Q_OBJECT
00105
00106 public:
00107
00109 MetaDataBrowser(bool editable = FALSE, QWidget * parent = 0, bool modal = FALSE);
00110
00112 template <class PeakType>
00113 void add(MSExperiment<PeakType> & exp)
00114 {
00115 add(static_cast<ExperimentalSettings &>(exp));
00116 treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
00117 }
00118
00120 template <class PeakType>
00121 void add(MSSpectrum<PeakType> & spectrum)
00122 {
00123
00124 add(static_cast<SpectrumSettings &>(spectrum));
00125
00126
00127 for (Size i = 0; i < spectrum.getFloatDataArrays().size(); ++i)
00128 {
00129 add(spectrum.getFloatDataArrays()[i]);
00130 }
00131 for (Size i = 0; i < spectrum.getIntegerDataArrays().size(); ++i)
00132 {
00133 add(spectrum.getIntegerDataArrays()[i]);
00134 }
00135 for (Size i = 0; i < spectrum.getStringDataArrays().size(); ++i)
00136 {
00137 add(spectrum.getStringDataArrays()[i]);
00138 }
00139
00140 add(static_cast<MetaInfoInterface &>(spectrum));
00141
00142 treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
00143 }
00144
00146 template <class FeatureType>
00147 void add(FeatureMap<FeatureType> & map)
00148 {
00149
00150 add(static_cast<DocumentIdentifier &>(map));
00151
00152
00153 for (Size i = 0; i < map.getProteinIdentifications().size(); ++i)
00154 {
00155 add(map.getProteinIdentifications()[i]);
00156 }
00157
00158
00159 for (Size i = 0; i < map.getUnassignedPeptideIdentifications().size(); ++i)
00160 {
00161 add(map.getUnassignedPeptideIdentifications()[i]);
00162 }
00163
00164 treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
00165 }
00166
00168 void add(Feature & feature);
00170 void add(ConsensusFeature & feature);
00171
00173 void add(ConsensusMap & map);
00174
00180 template <class MetaDataType>
00181 void add(MetaDataType & meta_data_object)
00182 {
00183 visualize_(meta_data_object);
00184 treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
00185 }
00186
00188 bool isEditable();
00189
00191 friend class ProteinIdentificationVisualizer;
00192 friend class PeptideIdentificationVisualizer;
00193
00194 public slots:
00195
00197 void setStatus(std::string status);
00198
00199 protected slots:
00200
00202 void showDetails_();
00203
00205 void saveAll_();
00206
00207 protected:
00208
00210
00211 void visualize_(ExperimentalSettings & meta, QTreeWidgetItem * parent = 0);
00212 void visualize_(SpectrumSettings & meta, QTreeWidgetItem * parent = 0);
00213 void visualize_(MetaInfoInterface & meta, QTreeWidgetItem * parent = 0);
00214 void visualize_(Sample & meta, QTreeWidgetItem * parent = 0);
00215 void visualize_(HPLC & meta, QTreeWidgetItem * parent = 0);
00216 void visualize_(Digestion & meta, QTreeWidgetItem * parent = 0);
00217 void visualize_(Modification & meta, QTreeWidgetItem * parent = 0);
00218 void visualize_(Tagging & meta, QTreeWidgetItem * parent = 0);
00219 void visualize_(Gradient & meta, QTreeWidgetItem * parent = 0);
00220 void visualize_(Software & meta, QTreeWidgetItem * parent = 0);
00221 void visualize_(ScanWindow & meta, QTreeWidgetItem * parent = 0);
00222 void visualize_(SourceFile & meta, QTreeWidgetItem * parent = 0);
00223 void visualize_(ContactPerson & meta, QTreeWidgetItem * parent = 0);
00224 void visualize_(Instrument & meta, QTreeWidgetItem * parent = 0);
00225 void visualize_(IonSource & meta, QTreeWidgetItem * parent = 0);
00226 void visualize_(IonDetector & meta, QTreeWidgetItem * parent = 0);
00227 void visualize_(MassAnalyzer & meta, QTreeWidgetItem * parent = 0);
00228 void visualize_(DataProcessing & meta, QTreeWidgetItem * parent = 0);
00229 void visualize_(ProteinIdentification & meta, QTreeWidgetItem * parent = 0);
00230 void visualize_(ProteinHit & meta, QTreeWidgetItem * parent = 0);
00231 void visualize_(PeptideHit & meta, QTreeWidgetItem * parent = 0);
00232 void visualize_(Acquisition & meta, QTreeWidgetItem * parent = 0);
00233 void visualize_(AcquisitionInfo & meta, QTreeWidgetItem * parent = 0);
00234 void visualize_(MetaInfoDescription & meta, QTreeWidgetItem * parent = 0);
00235 void visualize_(Precursor & meta, QTreeWidgetItem * parent = 0);
00236 void visualize_(Product & meta, QTreeWidgetItem * parent = 0);
00237 void visualize_(InstrumentSettings & meta, QTreeWidgetItem * parent = 0);
00238 void visualize_(PeptideIdentification & meta, QTreeWidgetItem * parent = 0);
00239 void visualize_(DocumentIdentifier & meta, QTreeWidgetItem * parent = 0);
00241
00243 template <typename ContainerType>
00244 void visualizeAll_(ContainerType & container, QTreeWidgetItem * parent)
00245 {
00246 for (typename ContainerType::iterator it = container.begin(); it != container.end(); ++it)
00247 {
00248 visualize_(*it, parent);
00249 }
00250 }
00251
00253 void connectVisualizer_(BaseVisualizerGUI * ptr);
00254
00256 void filterHits_(DoubleReal threshold, bool higher_better, int tree_item_id);
00258 void showAllHits_(int tree_item_id);
00259
00261 std::string status_list_;
00262
00264 bool editable_;
00265
00267 QStackedWidget * ws_;
00269 QPushButton * saveallbutton_;
00271 QPushButton * closebutton_;
00273 QPushButton * cancelbutton_;
00275 QPushButton * undobutton_;
00276
00278 QTreeWidget * treeview_;
00279 };
00280 }
00281 #endif