PreferencesColor.qo.h

Go to the documentation of this file.
00001 //# Copyright (C) 2005
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 #ifndef PREFERENCESCOLOR_QO_H
00026 #define PREFERENCESCOLOR_QO_H
00027 
00028 #include <QtGui/QDialog>
00029 #include <QMap>
00030 
00031 #include <guitools/Feather/PreferencesColor.ui.h>
00032 #include <guitools/Feather/CurveDisplay.h>
00033 #include <guitools/Feather/FeatherCurveType.h>
00034 
00035 namespace casa {
00036 
00037 class PreferencesFunction;
00038 
00044 class PreferencesColor : public QDialog
00045 {
00046     Q_OBJECT
00047 
00048 public:
00049     PreferencesColor(QWidget *parent = 0);
00050     typedef FeatherCurveType::CurveType CurveType;
00051 
00052     QMap<CurveType,CurveDisplay> getFunctionColors() const;
00053     CurveType getScatterXCurve() const;
00054     QString getScatterXCurveTitle() const;
00055     QList<CurveType> getScatterYCurve() const;
00056 
00057     void setDirtyEnabled( bool enabled );
00058 
00059     ~PreferencesColor();
00060 
00061 signals:
00062         void colorsChanged();
00063 
00064 private slots:
00065         void colorsAccepted();
00066         void colorsRejected();
00067         void populateScatterAxes();
00068         void populateScatterAxisY();
00069 
00070 private:
00071         void initializeUser();
00072         void initializeCurvePreferences();
00073         void saveScatterSettings();
00074         void resetScatterSettings();
00075         void populateScatterAxisX();
00076         QList<QString> getCurveNames();
00077         CurveType getType( const QString& title ) const;
00078         CurveType findCurve( const QString& title ) const;
00079         void setCurveDefaults();
00080         void addCurvePreferences();
00081     void reset();
00082     void persist();
00083 
00084     Ui::PreferencesColorClass ui;
00085 
00086     void addCurvePreference( QWidget* holder, CurveType index );
00087     QMap<CurveType,PreferencesFunction*> curvePreferences;
00088     CurveType scatterXIndex;
00089     QList<CurveType> scatterYIndices;
00090     static const QString SCATTER_X_CURVE;
00091     static const QString SCATTER_Y_CURVES;
00092 
00093 };
00094 }
00095 
00096 #endif // PREFERENCESCOLOR_QO_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1