First we need to create a QApplication in order to be able to use Qt widgets in out application.
Then we load a DTA file (the first command line argument of our application).
MSExperiment<> exp; exp.resize(1); DTAFile().load(argv[1],exp[0]);
Then we create a widget for 1D visualization and hand over the data.
Spectrum1DWidget* widget = new Spectrum1DWidget(Param(),0);
widget->canvas()->addLayer(exp);
widget->show();
Finally we start the application.
return app.exec(); } //end of main
We need to create a QApplication, load the data from a file (e.g. the parameters file of any TOPP tool), create the ParamEditor and execute the application:
Int main(int argc, const char** argv) { QApplication app(argc,const_cast<char**>(argv)); Param param; param.load(argv[1]); ParamEditor* editor = new ParamEditor(0); editor->load(param); editor->show(); app.exec();
When it is closed, we store the result back to the Param object and then to the file.
editor->store(); param.store(argv[1]); return 0; } //end of main
Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |