casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PreferencesColor.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef PREFERENCESCOLOR_QO_H
26 #define PREFERENCESCOLOR_QO_H
27 
28 #include <QDialog>
29 #include <QMap>
30 
31 #include <guitools/Feather/PreferencesColor.ui.h>
34 
35 namespace casa {
36 
37 class PreferencesFunction;
38 
44 class PreferencesColor : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  PreferencesColor(QWidget *parent = 0);
51 
52  QMap<CurveType,CurveDisplay> getFunctionColors() const;
54  QString getScatterXCurveTitle() const;
55  QList<CurveType> getScatterYCurve() const;
56 
57  void setDirtyEnabled( bool enabled );
58 
60 
61 signals:
62  void colorsChanged();
63 
64 private slots:
65  void colorsAccepted();
66  void colorsRejected();
67  void populateScatterAxes();
68  void populateScatterAxisY();
69 
70 private:
71  void initializeUser();
73  void saveScatterSettings();
74  void resetScatterSettings();
75  void populateScatterAxisX();
76  QList<QString> getCurveNames();
77  CurveType getType( const QString& title ) const;
78  CurveType findCurve( const QString& title ) const;
79  void setCurveDefaults();
80  void addCurvePreferences();
81  void reset();
82  void persist();
83 
84  Ui::PreferencesColorClass ui;
85 
86  void addCurvePreference( QWidget* holder, CurveType index );
87  QMap<CurveType,PreferencesFunction*> curvePreferences;
89  QList<CurveType> scatterYIndices;
90  static const QString SCATTER_X_CURVE;
91  static const QString SCATTER_Y_CURVES;
92 
93 };
94 }
95 
96 #endif // PREFERENCESCOLOR_QO_H
static const QString SCATTER_X_CURVE
QList< CurveType > scatterYIndices
PreferencesColor(QWidget *parent=0)
QString getScatterXCurveTitle() const
FeatherCurveType::CurveType CurveType
CurveType getScatterXCurve() const
QMap< CurveType, PreferencesFunction * > curvePreferences
Ui::PreferencesColorClass ui
void addCurvePreference(QWidget *holder, CurveType index)
QList< QString > getCurveNames()
void setDirtyEnabled(bool enabled)
QMap< CurveType, CurveDisplay > getFunctionColors() const
QList< CurveType > getScatterYCurve() const
static const QString SCATTER_Y_CURVES
CurveType findCurve(const QString &title) const
Manages the display properties of all the curves that can be shown on the plots.
CurveType getType(const QString &title) const
CurveType
Note: Order in this listing is important.