~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to source/EXAMPLES/Tutorial_Spectrum1D.C

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2012-11-12 15:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20121112155812-vr15wtg9b50cuesg
Tags: upstream-1.9.0
ImportĀ upstreamĀ versionĀ 1.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <QtGui/QApplication>
 
2
#include <OpenMS/VISUAL/Spectrum1DWidget.h>
 
3
#include <OpenMS/FORMAT/DTAFile.h>
 
4
#include <OpenMS/KERNEL/StandardTypes.h>
 
5
#include <OpenMS/VISUAL/LayerData.h>
 
6
 
 
7
using namespace OpenMS;
 
8
using namespace std;
 
9
 
 
10
Int main(int argc, const char** argv)
 
11
{  
 
12
  QApplication app(argc,const_cast<char**>(argv));
 
13
  
 
14
  PeakMap exp;
 
15
  exp.resize(1);
 
16
  DTAFile().load("data/Tutorial_Spectrum1D.dta",exp[0]);
 
17
  LayerData::ExperimentSharedPtrType exp_sptr(new PeakMap(exp)); 
 
18
  Spectrum1DWidget* widget = new Spectrum1DWidget(Param(),0);
 
19
  widget->canvas()->addLayer(exp_sptr);
 
20
  widget->show();
 
21
  
 
22
  return app.exec();
 
23
} //end of main