rangecontrol.h

Go to the documentation of this file.
00001 #ifndef RANGEDIALOG_H
00002 #define RANGEDIALOG_H
00003 /* ====================================================================================
00004 The definition of the range control window class.
00005 
00006 ==================================================================================== */
00007 /*
00008                         Fetch header files.
00009 */
00010 #include <vector>
00011 #include "colortable.h"
00012 #include "ui_rangecontrol.h"
00013 #include "enums.h"
00014 
00015 class Skymap;
00016 
00017 class RangeControl : public QWidget, private Ui::RangeControl
00018 {
00019         Q_OBJECT
00020 public:
00021         RangeControl (QWidget *parent = 0);
00022 
00023         // initialize and associate with a given sky map
00024         void init(Skymap *map_);
00025 
00026         // Let others know the current state
00027         Projection getProjection() const { return proj; };
00028         Field getField() const { return fld; };
00029         PolVectors getPolVect() const { return pv; };
00030         int getMapIndex(void) const;
00031         float getMinimum() { return minv; };
00032         float getMaximum() { return maxv; };
00033         int getRigging() const { return rigging; };
00034         ColorTable *getColorTable() const;
00035 
00036         void setProjection(Projection);
00037         void setField(Field);
00038         void setPolarVect(PolVectors);
00039 
00040 signals:
00041         // Need to retexture the sphere
00042         void reTextureNeeded();
00043         // Update the rigging
00044         void changeProjRigging();
00045         // Update the displayed field info
00046         void changeFieldInfo();
00047         // Update showing the polarization vectors
00048         void changePolVect();
00049 
00050 private:
00051         // state variables
00052         Projection proj;
00053         Field fld;
00054         int rigging;
00055         PolVectors pv;
00056 
00057         float minv;
00058         float maxv;
00059 
00060         ColorTableList ctl;                     // List of supported color tables.
00061 
00062         Skymap *map;
00063         std::vector<Field> fields;
00064 
00065 private slots:
00066         // auto-connect the ComboBoxes with their responses
00067         void on_projectionSelect_activated(int);
00068         void on_fieldSelect_activated(int);
00069         void on_riggingSelect_activated(int);
00070         void on_colorSelect_activated(int);
00071         void on_polarVectorBox_clicked(bool);
00072         // need to update the texture
00073         void updateTexture(float l, float u);
00074 };
00075 #endif

Generated on Fri Feb 6 15:32:42 2009 for Skyviewer by  doxygen 1.4.7