ColorSummaryWidget.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 
00026 #ifndef COLOR_SUMMARYWIDGET_QO_H
00027 #define COLOR_SUMMARYWIDGET_QO_H
00028 
00029 #include <QtGui/QWidget>
00030 #include <QSettings>
00031 #include <display/QtPlotter/ColorSummaryWidget.ui.h>
00032 
00033 namespace casa {
00034 
00035         class QtCanvas;
00036 
00037         class ColorSummaryWidget : public QDialog {
00038                 Q_OBJECT
00039 
00040         public:
00041                 ColorSummaryWidget(QWidget *parent = 0);
00042                 ~ColorSummaryWidget();
00043                 void setColorCanvas( QtCanvas* colorCanvas );
00044 
00045         private slots:
00046 
00047                 //Methods to add colors in various categories
00048                 void addColorProfile();
00049                 void addColorFit();
00050                 void addColorFitSummary();
00051                 void channelLineColorChanged();
00052                 void molecularLineColorChanged();
00053                 void zoomRectColorChanged();
00054                 void initialGaussianEstimateColorChanged();
00055 
00056                 //Methods to remove colors in various categories
00057                 void removeColorProfile();
00058                 void removeColorFit();
00059                 void removeColorFitSummary();
00060 
00061                 //User changed to a different color scheme (traditional,
00062                 //alternative, custom, etc)
00063                 void colorSchemeChanged();
00064 
00065                 //Stores any changes to the colors used by the application
00066                 //before closing the dialog.
00067                 void reject();
00068                 void accept();
00069 
00070         private:
00071                 void addColor( QListWidget* list );
00072                 void removeColor( QListWidget* list );
00073                 void initializeColors();
00074                 void addColorListItem( QListWidget* list, const QColor& listColor );
00075                 void readCustomColor( QSettings& settings, const QString& countKey,
00076                                       const QString& baseLookup, QList<QString>& list );
00077                 void populateColorList( const QList<QString>& colors, QListWidget* list );
00078                 void copyViewList(QListWidget* listWidget, QList<QString>& canvasList);
00079                 void copyViewLists();
00080                 void initializePresetColors();
00081                 void initializeUserColors();
00082                 void populateColorLists();
00083                 void clearColorLists();
00084                 void registerColorChange();
00085                 void clearColorChange();
00086                 void pixelCanvasColorChange();
00087                 void persistColorList( QSettings& settings, QListWidget* list,
00088                                        const QString& baseStr, const QString& countStr );
00089                 void persist();
00090                 void setLabelColor( QLabel* label, QString colorName  );
00091 
00092                 Ui::ColorSummaryWidget ui;
00093                 QtCanvas* pixelCanvas;
00094                 QList<QString> mainCurveColorList;
00095                 QList<QString> fitCurveColorList;
00096                 QList<QString> fitSummaryCurveColorList;
00097                 QList<QString>  traditionalCurveColorList;
00098                 QList<QString> customMainList;
00099                 QList<QString> customFitList;
00100                 QList<QString> customFitSummaryList;
00101                 QColor channelLineColor;
00102                 QColor zoomRectColor;
00103                 QColor molecularLineColor;
00104                 QColor initialGaussianEstimateColor;
00105                 enum ColorCategory {MAIN_COLOR, FIT_COLOR, SUMMARY_FIT_COLOR, END_COLOR_CATEGORY };
00106                 enum SchemeCategory {TRADITIONAL,ALTERNATIVE, CUSTOM };
00107 
00108                 static const QString CUSTOM_PROFILE_COLOR;
00109                 static const QString CUSTOM_FIT_COLOR;
00110                 static const QString CUSTOM_SUMMARY_COLOR;
00111                 static const QString CUSTOM_PROFILE_COLOR_COUNT;
00112                 static const QString CUSTOM_FIT_COLOR_COUNT;
00113                 static const QString CUSTOM_SUMMARY_COLOR_COUNT;
00114                 static const QString COLOR_SCHEME_PREFERENCE;
00115                 static const QString CHANNEL_LINE_COLOR;
00116                 static const QString INITIAL_GAUSSIAN_ESTIMATE_COLOR;
00117                 static const QString MOLECULAR_LINE_COLOR;
00118                 static const QString ZOOM_RECT_COLOR;
00119 
00120                 bool traditionalChange;
00121                 bool alternativeChange;
00122         };
00123 }
00124 
00125 #endif // COLORSUMMARYWIDGET_Q0_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1