1+ // --------------------------------------------------------------------------
2+ // OpenMS -- Open-Source Mass Spectrometry
3+ // --------------------------------------------------------------------------
4+ // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5+ // ETH Zurich, and Freie Universitaet Berlin 2002-2021.
6+ //
7+ // This software is released under a three-clause BSD license:
8+ // * Redistributions of source code must retain the above copyright
9+ // notice, this list of conditions and the following disclaimer.
10+ // * Redistributions in binary form must reproduce the above copyright
11+ // notice, this list of conditions and the following disclaimer in the
12+ // documentation and/or other materials provided with the distribution.
13+ // * Neither the name of any author or any participating institution
14+ // may be used to endorse or promote products derived from this software
15+ // without specific prior written permission.
16+ // For a full list of authors, refer to the file AUTHORS.
17+ // --------------------------------------------------------------------------
18+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+ // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+ // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+ // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22+ // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23+ // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24+ // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25+ // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26+ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27+ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28+ // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+ //
30+ // --------------------------------------------------------------------------
31+ // $Maintainer: Julianus Pfeuffer $
32+ // $Authors: Dhanmoni Nath, Julianus Pfeuffer $
33+ // --------------------------------------------------------------------------
34+
35+ #ifdef QT_WEBENGINEWIDGETS_LIB
136#include < OpenMS/VISUAL/SequenceVisualizer.h>
237#include < ui_SequenceVisualizer.h>
338
4- #include < QLabel>
5- #include < QDebug>
639#include < QWebChannel>
7- #include < QPushButton>
8- #include < QMessageBox>
9- #include < QJsonArray>
1040#include < QString>
1141
1242#include < QtWebEngineWidgets/QWebEngineView>
@@ -18,8 +48,8 @@ namespace OpenMS
1848 QWidget (parent), ui(new Ui::SequenceVisualizer)
1949 {
2050 ui->setupUi (this );
21- QWebEngineView * view = new QWebEngineView (parent);
22- QWebChannel * channel = new QWebChannel (this );
51+ auto * view = new QWebEngineView (parent);
52+ auto * channel = new QWebChannel (this );
2353 view->page ()->setWebChannel (channel);
2454 channel->registerObject (QString (" SequenceVisualizer" ), this );
2555 view->load (QUrl (" qrc:/new/sequence_viz.html" ));
@@ -31,14 +61,15 @@ namespace OpenMS
3161 delete ui;
3262 }
3363
34- void SequenceVisualizer::setProteinPeptideDataToJsonObj (QString accession_num,
35- QString pro_seq,
36- QJsonArray pep_data,
37- QJsonArray pep_mod_data)
64+ void SequenceVisualizer::setProteinPeptideDataToJsonObj (const QString& accession_num,
65+ const QString& pro_seq,
66+ const QJsonArray& pep_data,
67+ const QJsonArray& pep_mod_data)
3868 {
3969 m_json_data_obj[" accession_num" ] = accession_num;
4070 m_json_data_obj[" protein_sequence_data" ] = pro_seq;
4171 m_json_data_obj[" peptides_data" ] = pep_data;
4272 m_json_data_obj[" peptides_mod_data" ] = pep_mod_data;
4373 }
44- }// namespace OpenMS
74+ }// namespace OpenMS
75+ #endif
0 commit comments