GLIMSView Source Code Documentation

BandChooserDlg Class Reference

#include <bandchooserdlg.h>

Inheritance diagram for BandChooserDlg:

Inheritance graph
[legend]

List of all members.


Detailed Description

A user interface dialog that presents the bands of the open image within glimsviewer.

There are radio buttons for RGB or Greyscale that allows the user to select a multiple bands or a single band for display.

Definition at line 39 of file bandchooserdlg.h.


Public Slots

void loadBands ()
 Display current band selection.
void reloadList ()
 (Re)populate the band list.
void colorChanged (int color)
 Change current color.
void setColor (QListViewItem *selItem)
 Set current color.
void toggleShade (int col)
 Toggle greyscale/color.
void setImage (Image *img)
 Set the active image.

Signals

void selBandsChanged ()
 Signal emitted when band selection is changed.

Public Member Functions

 BandChooserDlg (QWidget *parent, Image *img)
 Initializes local member variables and creates the UI for selecting bands.

Protected Member Functions

void createIconSets ()

Protected Attributes

ImagemImg
 reference to the band info set
QPixmap mColorIcon [4]
bool mColor
 color or greyscale (true || false)
int mCurColor
int mBandSel [3]
bool mBlockSig
widgets in dialog
QListView * mList
QRadioButton * mRadColor
QRadioButton * mRadGrey
QPushButtonmButRed
QPushButtonmButGreen
QPushButtonmButBlue
QButtonGroup * mRgbGroup

Constructor & Destructor Documentation

BandChooserDlg::BandChooserDlg ( QWidget parent,
Image img 
)

Initializes local member variables and creates the UI for selecting bands.

Definition at line 5 of file bandchooserdlg.cpp.

References colorChanged(), createIconSets(), loadBands(), mBandSel, mButBlue, mButGreen, mButRed, mColorIcon, mCurColor, mList, mRadColor, mRadGrey, mRgbGroup, setColor(), and toggleShade().

Here is the call graph for this function:


Member Function Documentation

void BandChooserDlg::createIconSets (  )  [protected]

Definition at line 97 of file bandchooserdlg.cpp.

References mColorIcon.

Referenced by BandChooserDlg().

void BandChooserDlg::loadBands (  )  [slot]

Display current band selection.

Event handler to display the current band selection in the image views. If the selection is invalid, this will tell the user to make a valid selection.

Definition at line 123 of file bandchooserdlg.cpp.

References mBandSel, ImageState::mBlue, ImageState::mColor, mColor, ImageState::mGreen, mImg, ImageState::mRed, selBandsChanged(), and Image::setBandSel().

Referenced by BandChooserDlg().

void BandChooserDlg::reloadList (  )  [slot]

(Re)populate the band list.

Fill the band selection list with all available bands grouped by image.

Definition at line 165 of file bandchooserdlg.cpp.

References ImageFormat::dtypeToString(), Image::getBandInfSet(), mImg, and mList.

Referenced by setImage(), and toggleShade().

void BandChooserDlg::colorChanged ( int  color  )  [slot]

Change current color.

Event handler for the RGB radio button set. Changes the current color to the selected.

Parameters:
color color selection

Definition at line 245 of file bandchooserdlg.cpp.

References mCurColor.

Referenced by BandChooserDlg().

void BandChooserDlg::setColor ( QListViewItem *  selItem  )  [slot]

Set current color.

Event handler for the RGB radio buttons. Sets the current color to that which is selected.

Parameters:
selItem selected color item in list view

Definition at line 250 of file bandchooserdlg.cpp.

References mBandSel, mBlockSig, mColor, mColorIcon, mCurColor, mList, and mRgbGroup.

Referenced by BandChooserDlg().

void BandChooserDlg::toggleShade ( int  col  )  [slot]

Toggle greyscale/color.

Event handler for color checkbox to change from color to greyscale & vice versa.

Parameters:
col flag to indicate if toggling to color or greyscale mode

Definition at line 207 of file bandchooserdlg.cpp.

References mBandSel, mButBlue, mButGreen, mButRed, mColor, mCurColor, mList, mRgbGroup, and reloadList().

Referenced by BandChooserDlg().

void BandChooserDlg::setImage ( Image img  )  [inline, slot]

Set the active image.

Sets the active Image to the new Image and reloads the band chooser list.

Parameters:
img Image to be set as the active image.

Definition at line 130 of file bandchooserdlg.h.

References mImg, and reloadList().

void BandChooserDlg::selBandsChanged (  )  [signal]

Signal emitted when band selection is changed.

Referenced by loadBands().


Member Data Documentation

reference to the band info set

Definition at line 43 of file bandchooserdlg.h.

Referenced by loadBands(), reloadList(), and setImage().

QListView* BandChooserDlg::mList [protected]

Definition at line 50 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), reloadList(), setColor(), and toggleShade().

QRadioButton* BandChooserDlg::mRadColor [protected]

Definition at line 51 of file bandchooserdlg.h.

Referenced by BandChooserDlg().

QRadioButton* BandChooserDlg::mRadGrey [protected]

Definition at line 52 of file bandchooserdlg.h.

Referenced by BandChooserDlg().

Definition at line 53 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), and toggleShade().

Definition at line 54 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), and toggleShade().

Definition at line 55 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), and toggleShade().

QButtonGroup* BandChooserDlg::mRgbGroup [protected]

Definition at line 56 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), setColor(), and toggleShade().

QPixmap BandChooserDlg::mColorIcon[4] [protected]

Definition at line 59 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), createIconSets(), and setColor().

bool BandChooserDlg::mColor [protected]

color or greyscale (true || false)

Definition at line 61 of file bandchooserdlg.h.

Referenced by loadBands(), setColor(), and toggleShade().

int BandChooserDlg::mCurColor [protected]

Definition at line 64 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), colorChanged(), setColor(), and toggleShade().

int BandChooserDlg::mBandSel[3] [protected]

Definition at line 65 of file bandchooserdlg.h.

Referenced by BandChooserDlg(), loadBands(), setColor(), and toggleShade().

bool BandChooserDlg::mBlockSig [protected]

Definition at line 66 of file bandchooserdlg.h.

Referenced by setColor().


The documentation for this class was generated from the following files:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov