#include <view.h>
This captures user events and emits signals for each allowing classes such as VectorEditor to handle user input.
Definition at line 28 of file view.h.
enum View::Tool |
View::View | ( | QWidget * | parent | ) |
View::View | ( | QWidget * | parent, | |
Image * | img, | |||
VectorLayerSet * | vls | |||
) |
void View::init | ( | ) |
Definition at line 25 of file view.cpp.
References View::Box::dim, Rect::h, mChildLinked, mCTableNew, mCurImg, mCurScreen, mDspImg, mDspVec, mFullRedraw, mImage, View::MouseState::mLeftButDown, mLinkBox, View::MouseState::mMidButDown, mMouse, View::Box::moving, mPaning, mParentLinked, View::MouseState::mRightButDown, mSclType, mSelBox, mTimer, mVirDims, ImageFormat::SCALE_NN, timerDone(), Rect::w, Rect::x, and Rect::y.
Referenced by View().
void View::setImage | ( | Image * | img | ) |
Definition at line 100 of file view.cpp.
References calcDims(), and mImage.
Referenced by MainToolbar::setupProj().
void View::setVectorLayerSet | ( | VectorLayerSet * | lyrset | ) | [inline] |
void View::setLinkChild | ( | View * | linkview | ) |
Definition at line 108 of file view.cpp.
References getViewState(), getVirDims(), mLinkLimits, ViewState::mName, mParentLinked, ViewState::mParentName, mState, parentLinkBoxChanged(), parentVirDimsChanged(), setLinkLimits(), and setVirDims().
Referenced by MainToolbar::buildDefaultViews().
void View::setLinkParent | ( | View * | linkview | ) |
Definition at line 127 of file view.cpp.
References childVirDimsChanged(), View::Box::dim, getViewState(), getVirDims(), mChildLinked, ViewState::mChildName, mLinkBox, ViewState::mName, mState, and setLinkBoxDims().
Referenced by MainToolbar::buildDefaultViews().
void View::setZoomAttr | ( | ZoomAttr | attr | ) |
Definition at line 161 of file view.cpp.
References calcDims(), ZoomAttr::FIXED, Rect::h, mDspDims, mFullRedraw, mState, mVirDims, ViewState::mZoom, ZoomAttr::SCALE, ZoomAttr::type, Rect::w, Rect::x, and Rect::y.
Referenced by MainToolbar::buildDefaultViews().
ZoomAttr * View::getZoomAttr | ( | ) | const |
void View::captureImage | ( | ) |
void View::calcDims | ( | ) |
Definition at line 335 of file view.cpp.
References ZoomAttr::factor, ZoomAttr::FIXED, ZoomAttr::FREE, Rect::h, Image::height(), mDspDims, mImage, mState, mVirDims, ViewState::mZoom, ZoomAttr::SCALE, ZoomAttr::type, Rect::w, ZoomAttr::WHOLE, Image::width(), Rect::x, and Rect::y.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintEvent(), resizeEvent(), setImage(), and setZoomAttr().
void View::fullRedraw | ( | ) |
const Rect & View::getVirDims | ( | ) | const |
Definition at line 712 of file view.cpp.
References mVirDims.
Referenced by setLinkChild(), and setLinkParent().
void View::dspToVir | ( | double & | x, | |
double & | y | |||
) |
Definition at line 716 of file view.cpp.
References ZoomAttr::factor, mState, mVirDims, ViewState::mZoom, Rect::x, and Rect::y.
Referenced by dspToVir(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
void View::virToDsp | ( | double & | x, | |
double & | y | |||
) |
Definition at line 723 of file view.cpp.
References ZoomAttr::factor, mState, mVirDims, ViewState::mZoom, Rect::x, and Rect::y.
Referenced by virDimToDsp(), and virToDsp().
void View::dspToVir | ( | int & | x, | |
int & | y | |||
) |
Definition at line 730 of file view.cpp.
References dspToVir().
void View::virToDsp | ( | int & | x, | |
int & | y | |||
) |
Definition at line 739 of file view.cpp.
References virToDsp().
Definition at line 748 of file view.cpp.
References Rect::h, virToDsp(), Rect::w, Rect::x, and Rect::y.
Referenced by paintEvent().
void View::initView | ( | ) |
Definition at line 66 of file view.cpp.
References mImage, resetView(), viewKeyPress(), viewKeyRelease(), viewMouseMove(), viewMousePress(), and viewMouseRelease().
void View::resetView | ( | ) |
Definition at line 80 of file view.cpp.
References View::Box::dim, Rect::h, mCurImg, mFullRedraw, mLinkBox, View::Box::moving, mVirDims, Rect::w, Rect::x, and Rect::y.
Referenced by initView().
void View::loadCaption | ( | ) | [inline] |
Definition at line 129 of file view.h.
References ZoomAttr::factor, ViewState::mName, mState, and ViewState::mZoom.
Referenced by mousePressEvent(), resizeEvent(), setViewName(), and timerDone().
void View::setViewName | ( | std::string | name | ) | [inline] |
Definition at line 137 of file view.h.
References loadCaption(), ViewState::mName, and mState.
Referenced by MainToolbar::buildDefaultViews().
ViewState& View::getViewState | ( | ) | [inline] |
Definition at line 142 of file view.h.
References mState.
Referenced by ViewSet::addView(), MainToolbar::fromXML(), ViewSet::popupView(), setLinkChild(), and setLinkParent().
void View::centerOn | ( | double | x, | |
double | y | |||
) |
Definition at line 778 of file view.cpp.
References childVirDimsChanged(), View::Box::dim, Rect::h, mFullRedraw, mLinkBox, mVirDims, parentLinkBoxChanged(), parentVirDimsChanged(), Rect::w, Rect::x, and Rect::y.
Referenced by keyPressEvent(), and mousePressEvent().
void View::setEditable | ( | bool | b | ) | [inline] |
Definition at line 148 of file view.h.
References ViewState::mEditable, and mState.
Referenced by MainToolbar::buildDefaultViews().
MouseState& View::getMouseState | ( | ) | [inline] |
void View::setRSM | ( | ImageFormat::ScaleType | st | ) | [inline] |
Definition at line 156 of file view.h.
References fullRedraw(), and mSclType.
ImageFormat::ScaleType View::getRSM | ( | ) | [inline] |
void View::paintEvent | ( | QPaintEvent * | ) |
Definition at line 187 of file view.cpp.
References calcDims(), childVirDimsChanged(), View::Box::dim, VectorLayer::draw(), ZoomAttr::factor, ZoomAttr::FIXED, Image::getImageState(), VectorLayerSet::getLayer(), Image::getRect(), Rect::h, Image::height(), mChildLinked, mCTableNew, mCurImg, View::MouseState::mCurPos, mCurScreen, mDspDims, mFullRedraw, mGlbHistUser, HistogramDataSource::mHistDlg, mImage, mLinkBox, mLyrSet, mMouse, View::Box::moving, mPaning, ImageState::mRed, mSclType, mSelBox, View::MouseState::mStartPos, mState, mVirDims, ViewState::mZoom, VectorLayerSet::numLayers(), parentVirDimsChanged(), HistogramDlg::reloadHistSet(), ZoomAttr::SCALE, HistogramUser::scaleVal(), ZoomAttr::type, virDimToDsp(), Rect::w, ZoomAttr::WHOLE, Image::width(), View::MousePos::x, Rect::x, View::MousePos::y, and Rect::y.
void View::mouseMoveEvent | ( | QMouseEvent * | me | ) |
Definition at line 393 of file view.cpp.
References View::Box::dim, dspToVir(), ZoomAttr::FIXED, Image::getLL(), Rect::h, View::MouseState::mCurPos, mDspDims, ViewState::mEditable, mImage, View::MouseState::mLastPos, View::MouseState::mLeftButDown, mLinkBox, mMouse, mousePosChanged(), View::Box::moving, View::MouseState::mStartPos, mState, mTool, mVirDims, ViewState::mZoom, View::Box::origpos, PAN_HAND, ZoomAttr::SCALE, ZoomAttr::type, viewMouseMove(), Rect::w, Rect::x, View::MousePos::x, View::Box::xoff, Rect::y, View::MousePos::y, and View::Box::yoff.
void View::mousePressEvent | ( | QMouseEvent * | me | ) |
Definition at line 464 of file view.cpp.
References calcDims(), centerOn(), View::Box::dim, dspToVir(), ZoomAttr::factor, ZoomAttr::FREE, Rect::h, loadCaption(), View::MouseState::mCurPos, ViewState::mEditable, mFullRedraw, View::MouseState::mLastPos, View::MouseState::mLeftButDown, mLinkBox, mMouse, View::Box::moving, mPaning, View::MouseState::mRightButDown, View::MouseState::mStartPos, mState, mTool, ViewState::mZoom, View::Box::origpos, PAN_HAND, ZoomAttr::SCALE, ZoomAttr::type, viewMousePress(), Rect::w, Rect::x, View::MousePos::x, View::Box::xoff, Rect::y, View::MousePos::y, View::Box::yoff, ZOOMIN_INC, and ZOOMOUT_INC.
void View::mouseReleaseEvent | ( | QMouseEvent * | me | ) |
Definition at line 561 of file view.cpp.
References calcDims(), View::Box::dim, dspToVir(), ZoomAttr::factor, ZoomAttr::FIXED, Rect::h, mChildLinked, View::MouseState::mCurPos, ViewState::mEditable, mFullRedraw, View::MouseState::mLastPos, View::MouseState::mLeftButDown, mLinkBox, mLinkLimits, View::MouseState::mMidButDown, mMouse, View::Box::moving, mPaning, View::MouseState::mRightButDown, View::MouseState::mStartPos, mState, mTool, mVirDims, ViewState::mZoom, PAN_HAND, parentLinkBoxChanged(), ZoomAttr::SCALE, ZoomAttr::type, viewMouseRelease(), Rect::w, Rect::x, View::MousePos::x, Rect::y, and View::MousePos::y.
void View::keyPressEvent | ( | QKeyEvent * | ke | ) |
Definition at line 644 of file view.cpp.
References centerOn(), dspToVir(), View::MouseState::mCurPos, ViewState::mEditable, mMouse, mState, viewKeyPress(), View::MousePos::x, and View::MousePos::y.
void View::keyReleaseEvent | ( | QKeyEvent * | ke | ) |
Definition at line 654 of file view.cpp.
References ViewState::mEditable, mState, and viewKeyRelease().
void View::resizeEvent | ( | QResizeEvent * | ) |
Definition at line 634 of file view.cpp.
References calcDims(), loadCaption(), and mTimer.
char * View::getHistName | ( | ) | const [virtual] |
Implements HistogramDataSource.
Definition at line 659 of file view.cpp.
References ViewState::mName, and mState.
HistogramSet View::getHistSet | ( | ) | const [virtual] |
Implements HistogramDataSource.
Definition at line 663 of file view.cpp.
References Image::getImageState(), ImageState::mBlue, mCurImg, ImageState::mGreen, mImage, ImageState::mRed, and HistogramSet::setData().
void View::timerDone | ( | ) | [slot] |
Definition at line 706 of file view.cpp.
References loadCaption(), and mFullRedraw.
Referenced by init().
void View::setLinkLimits | ( | Rect | d | ) | [slot] |
void View::setVirDims | ( | Rect | d | ) | [slot] |
Definition at line 145 of file view.cpp.
References View::Box::dim, mChildLinked, mFullRedraw, mLinkBox, mVirDims, parentLinkBoxChanged(), Rect::x, and Rect::y.
Referenced by setLinkChild().
void View::setLinkBoxDims | ( | Rect | d | ) | [slot] |
Definition at line 156 of file view.cpp.
References View::Box::dim, and mLinkBox.
Referenced by setLinkParent().
void View::selBoxChanged | ( | Rect & | dim | ) | [slot] |
void View::ctableChanged | ( | ) | [slot] |
void View::parentVirDimsChanged | ( | Rect | ) | [signal] |
Referenced by centerOn(), paintEvent(), and setLinkChild().
void View::parentLinkBoxChanged | ( | Rect | ) | [signal] |
Referenced by centerOn(), mouseReleaseEvent(), setLinkChild(), and setVirDims().
void View::childVirDimsChanged | ( | Rect | ) | [signal] |
Referenced by centerOn(), paintEvent(), and setLinkParent().
void View::mousePosChanged | ( | View::MousePos | , | |
View::MousePos | ||||
) | [signal] |
Referenced by mouseMoveEvent().
void View::viewMouseMove | ( | QMouseEvent * | , | |
View::MouseState & | ||||
) | [signal] |
Referenced by initView(), and mouseMoveEvent().
void View::viewMousePress | ( | QMouseEvent * | , | |
View::MouseState & | ||||
) | [signal] |
Referenced by initView(), and mousePressEvent().
void View::viewMouseRelease | ( | QMouseEvent * | , | |
View::MouseState & | ||||
) | [signal] |
Referenced by initView(), and mouseReleaseEvent().
void View::viewKeyPress | ( | QKeyEvent * | ) | [signal] |
Referenced by initView(), and keyPressEvent().
void View::viewKeyRelease | ( | QKeyEvent * | ) | [signal] |
Referenced by initView(), and keyReleaseEvent().
virtual void HistogramDataSource::setHistogramDlg | ( | HistogramDlg * | hdlg | ) | [inline, virtual, inherited] |
Definition at line 59 of file histogramdatasource.h.
References HistogramDataSource::mHistDlg.
Referenced by HistogramDlg::addHDS().
View::Tool View::mTool = NO_TOOL [static] |
Definition at line 75 of file view.h.
Referenced by MainToolbar::buildViews(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), MainToolbar::setGIDTool(), MainToolbar::setLineTool(), MainToolbar::setPanHand(), MainToolbar::setSelTool(), MainToolbar::setZoomInInc(), MainToolbar::setZoomOutInc(), VectorEditor::viewMouseMove(), VectorEditor::viewMousePress(), and VectorEditor::viewMouseRelease().
HistogramUser View::mGlbHistUser [static] |
Definition at line 76 of file view.h.
Referenced by MainToolbar::buildViews(), MainToolbar::MainToolbar(), and paintEvent().
ViewState View::mState [protected] |
Definition at line 79 of file view.h.
Referenced by calcDims(), dspToVir(), getHistName(), getViewState(), getZoomAttr(), keyPressEvent(), keyReleaseEvent(), loadCaption(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), setEditable(), setLinkChild(), setLinkParent(), setViewName(), setZoomAttr(), and virToDsp().
MouseState View::mMouse [protected] |
Definition at line 80 of file view.h.
Referenced by getMouseState(), init(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and paintEvent().
Rect View::mVirDims [protected] |
Definition at line 81 of file view.h.
Referenced by calcDims(), centerOn(), dspToVir(), getVirDims(), init(), mouseMoveEvent(), mouseReleaseEvent(), paintEvent(), resetView(), setVirDims(), setZoomAttr(), and virToDsp().
Rect View::mDspDims [protected] |
Definition at line 82 of file view.h.
Referenced by calcDims(), mouseMoveEvent(), paintEvent(), and setZoomAttr().
Rect View::mLnkDims [protected] |
Rect View::mLinkLimits [protected] |
Definition at line 84 of file view.h.
Referenced by mouseReleaseEvent(), setLinkChild(), and setLinkLimits().
Box View::mLinkBox [protected] |
Definition at line 85 of file view.h.
Referenced by centerOn(), init(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), resetView(), setLinkBoxDims(), setLinkParent(), and setVirDims().
bool View::mChildLinked [protected] |
Definition at line 86 of file view.h.
Referenced by init(), mouseReleaseEvent(), paintEvent(), setLinkParent(), and setVirDims().
bool View::mParentLinked [protected] |
Rect View::mSelBox [protected] |
Image* View::mImage [protected] |
Definition at line 89 of file view.h.
Referenced by calcDims(), getHistSet(), init(), initView(), mouseMoveEvent(), paintEvent(), setImage(), and View().
VectorLayerSet* View::mLyrSet [protected] |
bool View::mDspImg [protected] |
bool View::mDspVec [protected] |
QPixmap* View::mCurScreen [protected] |
QImage* View::mCurImg [protected] |
Definition at line 94 of file view.h.
Referenced by getHistSet(), init(), paintEvent(), and resetView().
bool View::mFullRedraw [protected] |
Definition at line 95 of file view.h.
Referenced by centerOn(), fullRedraw(), init(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), resetView(), setVirDims(), setZoomAttr(), and timerDone().
QTimer* View::mTimer [protected] |
bool View::mCTableNew [protected] |
bool View::mPaning [protected] |
Definition at line 98 of file view.h.
Referenced by init(), mousePressEvent(), mouseReleaseEvent(), and paintEvent().
ImageFormat::ScaleType View::mSclType [protected] |
HistogramDlg* HistogramDataSource::mHistDlg [protected, inherited] |
Definition at line 47 of file histogramdatasource.h.
Referenced by paintEvent(), and HistogramDataSource::setHistogramDlg().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |