msidentificationlistwindow.h 2.31 KB
Newer Older
1
2

/*******************************************************************************
Renne Thomas's avatar
Renne Thomas committed
3
 * Copyright (c) 2019 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 *
 * This file is part of XTPcpp.
 *
 *     XTPcpp is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     XTPcpp is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with XTPcpp.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Contributors:
Renne Thomas's avatar
Renne Thomas committed
21
 *     Thomas Renne <thomas.renne@u-psud.fr>. - initial API and
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 *implementation
 ******************************************************************************/

#pragma once

#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include "msidentificationtablemodel.h"
#include "msidentificationtableproxymodel.h"
#include "ui_ms_identification_run_view.h"

class ProjectWindow;

// http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html
namespace Ui
{
class MsIdentificationView;
}

class MsIdentificationListWindow : public QMainWindow
{
  friend class MsIdentificationTableModel;
  friend class MsIdentificationTableProxyModel;

  Q_OBJECT

  public:
  explicit MsIdentificationListWindow(ProjectWindow *parent = 0);
  ~MsIdentificationListWindow();
Renne Thomas's avatar
Renne Thomas committed
52
53
  void setIdentificationDataSourceSpList(
    std::vector<IdentificationDataSourceSp> &identificationDataSourceSpList);
54

55
56
  void resizeColumnsToContents();

57
58
59
  public slots:
  void doExportAsOdsFile();

Renne Thomas's avatar
Renne Thomas committed
60
61
62
  signals:
  void MsIdentificationDataChanged();

63
  protected slots:
Renne Thomas's avatar
Renne Thomas committed
64
65
66
  void doSearchOn(QString search_on);
  void updateStatusBar();
  void onMsIdentificationSearchEdit(QString protein_search_string);
Renne Thomas's avatar
Renne Thomas committed
67

68
69
70
  private:
  Ui::MsIdentificationView *ui;
  MsIdentificationTableModel *m_msid_table_model_p = nullptr;
Renne Thomas's avatar
Renne Thomas committed
71
  MsIdentificationTableProxyModel *m_proxy_model   = nullptr;
72
73
74
75
76
  ProjectWindow *m_project_window;
  QMenu *_p_context_menu  = nullptr;
  bool _display_evalue    = true;
  bool _display_accession = true;
};