WavelengthUnitsComboBox.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2010 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef WAVELENGTHUNITSCOMBOBOX_H
00011 #define WAVELENGTHUNITSCOMBOBOX_H
00012 
00013 #include "TypesFile.h"
00014 
00015 #include <QtGui/QComboBox>
00016 
00017 /**
00018  *  A combo box that will allow a user to select wavelength units.
00019  *
00020  *  This is a read-only combo box that provides selection values based on the
00021  *  WavelengthUnitsType enum values.
00022  */
00023 class WavelengthUnitsComboBox : public QComboBox
00024 {
00025    Q_OBJECT
00026 
00027 public:
00028    /**
00029     *  Creates a new wavelength units combo box.
00030     *
00031     *  @param   pParent
00032     *           The parent widget.
00033     */
00034    WavelengthUnitsComboBox(QWidget* pParent = NULL);
00035 
00036    /**
00037     *  Destroys the combo box.
00038     */
00039    ~WavelengthUnitsComboBox();
00040 
00041    /**
00042     *  Sets the selected wavelength units.
00043     *
00044     *  @param   units
00045     *           The wavelength units to select.
00046     */
00047    void setUnits(WavelengthUnitsType units);
00048 
00049    /**
00050     *  Returns the selected wavelength units.
00051     *
00052     *  @return  The selected wavelength units.
00053     */
00054    WavelengthUnitsType getUnits() const;
00055 
00056 signals:
00057    /**
00058     *  Emitted when the user selects a units value in the combo box.
00059     *
00060     *  This signal is not emitted if the selected units change when setUnits()
00061     *  is called.
00062     *
00063     *  @param   units
00064     *           The newly selected units in the combo box.
00065     */
00066    void unitsActivated(WavelengthUnitsType units);
00067 
00068 private slots:
00069    void translateActivated(int index);
00070 
00071 private:
00072    WavelengthUnitsComboBox(const WavelengthUnitsComboBox& rhs);
00073    WavelengthUnitsComboBox& operator=(const WavelengthUnitsComboBox& rhs);
00074 };
00075 
00076 #endif

Software Development Kit - Opticks 4.9.0 Build 16218