casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSLoggerWidget.qo.h
Go to the documentation of this file.
1 //# PlotMSLoggerWidget.qo.h: Widget to set log events and priority filter.
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 PLOTMSLOGGERWIDGET_QO_H_
28 #define PLOTMSLOGGERWIDGET_QO_H_
29 
32 
33 #include <QComboBox>
34 
35 namespace casa {
36 
37 //# Forward declarations.
38 class QtComboCheckBox;
39 
40 
41 // Widget to set log events and priority filter.
43  Q_OBJECT
44 
45 public:
46  // Constructor which takes the maximum width for the widget and an optional
47  // parent. MUST be created after plotms' extended log types have already
48  // been registered with PlotLogger.
51  bool editFilename = true, bool editPriority = true,
52  QWidget* parent = NULL);
53 
54  // Destructor.
56 
57  // Gets/Sets the currently set filename.
58  // <group>
59  casacore::String filename() const;
60  void setFilename(const casacore::String& filename);
61  // </group>
62 
63  // Gets/Sets the currently set events flag.
64  // <group>
65  int events() const;
66  void setEvents(int events);
67  // </group>
68 
69  // Gets/Sets the currently set priority.
70  // <group>
73  // </group>
74 
75 private:
76  // Last set filename.
78 
79  // Widget for editing filename.
81 
82  // Last set events flag.
84 
85  // Combo check box for events.
87 
88  // Event values for the combo box indices.
90 
91  // Last set priority.
93 
94  // Combo box.
95  QComboBox* itsPriorityBox_;
96 
97 private slots:
98  // Slot for when the widget changes.
99  void widgetChanged();
100 };
101 
102 }
103 
104 #endif /* PLOTMSLOGGERWIDGET_QO_H_ */
Widget for choosing a file.
void setPriority(casacore::LogMessage::Priority priority)
int events() const
Gets/Sets the currently set events flag.
QComboBox * itsPriorityBox_
Combo box.
~PlotMSLoggerWidget()
Destructor.
QtFileWidget * itsFilenameWidget_
Widget for editing filename.
casacore::String filename() const
Gets/Sets the currently set filename.
Widget to set log events and priority filter.
void setFilename(const casacore::String &filename)
void widgetChanged()
Slot for when the widget changes.
casacore::LogMessage::Priority itsPriority_
Last set priority.
PlotMSLoggerWidget(const casacore::String &filename, int events, casacore::LogMessage::Priority priority, int maxWidth, bool editFilename=true, bool editPriority=true, QWidget *parent=NULL)
Constructor which takes the maximum width for the widget and an optional parent.
int itsEvents_
Last set events flag.
casacore::String itsFilename_
Last set filename.
Subclass of QComboBox that uses the item delegate above.
QList< int > itsEventsIndexValues_
Event values for the combo box indices.
casacore::LogMessage::Priority priority() const
Gets/Sets the currently set priority.
QtComboCheckBox * itsEventsBox_
Combo check box for events.
Priority
An &quot;importance&quot; which is assigned to each LogMessage.
Definition: LogMessage.h:105
void setEvents(int events)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
A simple parent for editing widgets.