Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

IDEvaluationBase.h

Go to the documentation of this file.
00001 // --------------------------------------------------------------------------
00002 //                   OpenMS -- Open-Source Mass Spectrometry
00003 // --------------------------------------------------------------------------
00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012.
00006 //
00007 // This software is released under a three-clause BSD license:
00008 //  * Redistributions of source code must retain the above copyright
00009 //    notice, this list of conditions and the following disclaimer.
00010 //  * Redistributions in binary form must reproduce the above copyright
00011 //    notice, this list of conditions and the following disclaimer in the
00012 //    documentation and/or other materials provided with the distribution.
00013 //  * Neither the name of any author or any participating institution
00014 //    may be used to endorse or promote products derived from this software
00015 //    without specific prior written permission.
00016 // For a full list of authors, refer to the file AUTHORS.
00017 // --------------------------------------------------------------------------
00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 //
00030 // --------------------------------------------------------------------------
00031 // $Maintainer: Chris Bielow $
00032 // $Authors: Chris Bielow $
00033 // --------------------------------------------------------------------------
00034 
00035 #ifndef OPENMS_VISUAL_APPLICATIONS_IDEVALUATIONBASE_H
00036 #define OPENMS_VISUAL_APPLICATIONS_IDEVALUATIONBASE_H
00037 
00038 //OpenMS
00039 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
00040 #include <OpenMS/FORMAT/IdXMLFile.h>
00041 #include <OpenMS/ANALYSIS/ID/FalseDiscoveryRate.h>
00042 #include <OpenMS/KERNEL/MSSpectrum.h>
00043 #include <OpenMS/VISUAL/Spectrum1DWidget.h>
00044 
00045 //QT
00046 #include <QtGui/QMainWindow>
00047 #include <QtGui/QWorkspace>
00048 #include <QtGui/QButtonGroup>
00049 #include <QtCore/QProcess>
00050 #include <QtGui/QSplashScreen>
00051 
00052 class QToolBar;
00053 class QListWidget;
00054 class QTextEdit;
00055 class QWorkspace;
00056 class QLabel;
00057 class QWidget;
00058 class QTreeWidget;
00059 class QTreeWidgetItem;
00060 class QWebView;
00061 class QNetworkAccessManager;
00062 class QNetworkReply;
00063 
00064 namespace OpenMS
00065 {
00066   class TOPPASWidget;
00067   class TOPPASScene;
00068   class TOPPASTabBar;
00069   class TOPPASResources;
00070 
00078   class OPENMS_GUI_DLLAPI IDEvaluationBase :
00079     public QMainWindow,
00080     public DefaultParamHandler
00081   {
00082     Q_OBJECT
00083 
00084 public:
00085 
00087     IDEvaluationBase(QWidget * parent = 0);
00089     virtual ~IDEvaluationBase();
00090 
00091     QSize sizeHint() const;
00092 
00093     void setVisibleArea(double low, double high);
00094 
00095     const MSExperiment<>& getPoints() const;
00096 
00097     static StringList getSupportedImageFormats();
00098 
00099 public slots:
00100 
00101     void resetZoom();
00102 
00103     void setIntensityMode(int index);
00104 
00107     bool getPoints(std::vector<PeptideIdentification> & peptides /* cannot be const, to avoid copy */, const std::vector<DoubleReal> & q_value_thresholds, MSSpectrum<> & points);
00108     
00110     bool loadCurve(const String& file_name, MSSpectrum<>& points);
00113     bool addSearchFile(const String & file_name);
00115     void openFileDialog();
00117     void saveImageAs();
00120     bool exportAsImage(const QString & file_name, String & error_message, const QString & format = "");
00122     //void updateCurrentPath();
00124     void showAboutDialog();
00131     void showStatusMessage(std::string msg, OpenMS::UInt time);
00133     //void showCursorStatus(double x, double y);
00135     //void closeFile();
00137     //void updateToolBar();
00138 
00141     bool loadFiles(const StringList & list);
00142 
00143     void showURL();
00144 
00145 protected slots:
00146 
00148     //void updateMenu();
00150     //void showAsWindow_(TOPPASWidget* sw, const String& caption, const int special_id = -1);
00151 
00152 
00153 
00154 
00155 protected:
00156 
00158     QTextEdit * log_;
00160     QTextEdit * desc_;
00161 
00163     QWorkspace * ws_;
00164 
00165     Spectrum1DWidget * spec_1d_;
00166 
00168     QLabel * message_label_;
00169 
00171     TOPPASWidget * window_(int id) const;
00172 
00173 
00176     String current_path_;
00178 
00179     void closeEvent(QCloseEvent * event);
00180     void keyPressEvent(QKeyEvent * e);
00182 
00184     enum LogState
00185     {
00186       LS_NOTICE,             
00187       LS_WARNING,            
00188       LS_ERROR               
00189     };
00191     void showLogMessage_(LogState state, const String & heading, const String & body);
00192 
00193     std::vector<DoubleReal> q_value_thresholds_;
00194 
00195     // holds the computed curves for easy export to outside
00196     MSExperiment<> data_;
00197 
00201     QToolBar * tool_bar_;
00202     //common intensity modes
00203 
00204     QButtonGroup * intensity_button_group_;
00205     //1D specific stuff
00207 
00208   }; //class
00209 
00210 } //namespace
00211 
00212 #endif // OPENMS_VISUAL_APPLICATIONS_IDEVALUATIONBASE_H

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:40 using doxygen 1.7.1