OpenMS
TOPPViewOpenDialog.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Marc Sturm $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 // OpenMS_GUI config
12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13 
14 #include <OpenMS/CONCEPT/Types.h>
15 
16 #include <QtWidgets/QDialog>
17 
18 #include <map>
19 class QAbstractButton;
20 
21 namespace Ui
22 {
23  class TOPPViewOpenDialogTemplate;
24 }
25 
26 namespace OpenMS
27 {
28  class Param;
29  class String;
35  class OPENMS_GUI_DLLAPI TOPPViewOpenDialog :
36  public QDialog
37  {
38  Q_OBJECT
39 
40 public:
42  TOPPViewOpenDialog(const String & data_name, bool as_window, bool as_2d, bool cutoff, QWidget * parent = nullptr);
44  ~TOPPViewOpenDialog() override;
45 
47  bool viewMapAs2D() const;
49  bool viewMapAs1D() const;
51  bool isCutoffEnabled() const;
53  bool isDataDIA() const;
55  bool openAsNewWindow() const;
57  Int getMergeLayer() const;
58 
60  void disableDimension(bool as_2d);
62  void disableCutoff(bool cutoff_on);
64  void disableLocation(bool window);
70  void setMergeLayers(const std::map<Size, String> & layers);
71 
72 protected slots:
74  void updateViewMode_(QAbstractButton * button);
75 
76 protected:
79 
80 private:
81  Ui::TOPPViewOpenDialogTemplate* ui_;
82  };
83 
84 }
A more convenient string class.
Definition: String.h:34
Dataset opening options for TOPPView.
Definition: TOPPViewOpenDialog.h:37
bool viewMapAs1D() const
Returns true, if 1D mode is to be used for maps.
bool isCutoffEnabled() const
Returns if the low intensity peaks should be hidden.
void disableDimension(bool as_2d)
Disables view dimension section and sets the selected option.
void setMergeLayers(const std::map< Size, String > &layers)
Sets the possible merge layers (index and name) and activates the option.
~TOPPViewOpenDialog() override
Destructor.
void disableLocation(bool window)
Disables opening location section and sets the selected option.
TOPPViewOpenDialog(const String &data_name, bool as_window, bool as_2d, bool cutoff, QWidget *parent=nullptr)
Constructor.
bool map_as_2d_disabled_
Stores if this option is disabled, to avoid activating it in updateViewMode_()
Definition: TOPPViewOpenDialog.h:78
bool isDataDIA() const
Returns if the data is DIA / SWATH-MS data.
void disableCutoff(bool cutoff_on)
Disables cutoff section and sets the selected option.
Int getMergeLayer() const
Returns the index of the selected merge layer. If the option is not selected -1 is returned.
void updateViewMode_(QAbstractButton *button)
slot that disables 2D/3D options, when as layer is selected
bool openAsNewWindow() const
Returns true, if the data should be opened in a new window.
bool viewMapAs2D() const
Returns true, if 2D mode is to be used for maps.
Ui::TOPPViewOpenDialogTemplate * ui_
Definition: TOPPViewOpenDialog.h:81
int Int
Signed integer type.
Definition: Types.h:72
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: FLASHDeconvWizardBase.h:37