casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSFlaggingWidget.qo.h
Go to the documentation of this file.
1 //# PlotMSFlaggingWidget.qo.h: GUI widget for editing PlotMSFlagging.
2 //# Copyright (C) 2009
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef PLOTMSFLAGGINGWIDGET_QO_H_
28 #define PLOTMSFLAGGINGWIDGET_QO_H_
29 
30 #include <plotms/Gui/PlotMSFlaggingWidget.ui.h>
31 
34 
35 namespace casa {
36 
37 //# Forward Declarations.
38 class PlotMSPlot;
39 class PlotMSSelectionWidget;
40 
41 
42 // GUI widget for editing a PlotMSFlagging object.
43 class PlotMSFlaggingWidget : public QtEditingWidget, Ui::FlaggingWidget {
44  Q_OBJECT
45 
46 public:
47  // Constructor that takes an optional parent widget.
48  PlotMSFlaggingWidget(QWidget* parent = NULL);
49 
50  // Destructor.
52 
53 
54  // Gets the currently set value, using the given PlotMSPlot to get the MS
55  // objects from if not NULL. If the plot is NULL, then the casacore::MS objects must
56  // be set using PlotMSFlagging::setMS() before being used.
57  PlotMSFlagging getValue(PlotMSPlot* plot = NULL) const;
58 
59  // Sets the currently displayed value to the given. If casacore::MS objects are set
60  // in the given value, they are ignored.
61  void setValue(const PlotMSFlagging& flagging);
62 
63 private:
64  // Last set value.
66 
67  // Changed flag.
68  bool itsFlag_;
69 
70  // Value widgets.
71  // <group>
72  QMap<PlotMSFlagging::Field, QAbstractButton*> itsFlags_;
73  QMap<PlotMSFlagging::Field, QLineEdit*> itsValues_;
74  QMap<PlotMSFlagging::Field, PlotMSSelectionWidget*> itsSelectionValues_;
75  // </group>
76 
77 private slots:
78  // Slot for when a GUI widget value changes.
79  void flaggingChanged();
80 };
81 
82 }
83 
84 #endif /* PLOTMSFLAGGINGWIDGET_QO_H_ */
void flaggingChanged()
Slot for when a GUI widget value changes.
QMap< PlotMSFlagging::Field, PlotMSSelectionWidget * > itsSelectionValues_
~PlotMSFlaggingWidget()
Destructor.
QMap< PlotMSFlagging::Field, QAbstractButton * > itsFlags_
Value widgets.
PlotMSFlagging getValue(PlotMSPlot *plot=NULL) const
Gets the currently set value, using the given PlotMSPlot to get the MS objects from if not NULL...
QMap< PlotMSFlagging::Field, QLineEdit * > itsValues_
Specifies flagging parameters (including possibly flag extension) for an MS.
Class for a single &quot;plot&quot; concept.
Definition: PlotMSPlot.h:57
GUI widget for editing a PlotMSFlagging object.
void setValue(const PlotMSFlagging &flagging)
Sets the currently displayed value to the given.
PlotMSFlagging itsValue_
Last set value.
PlotMSFlaggingWidget(QWidget *parent=NULL)
Constructor that takes an optional parent widget.
A simple parent for editing widgets.