PreviewEditCPTool.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00002 
00010 /*
00011  *  This program is free software; you can redistribute it and/or
00012  *  modify it under the terms of the GNU General Public
00013  *  License as published by the Free Software Foundation; either
00014  *  version 2 of the License, or (at your option) any later version.
00015  *
00016  *  This software is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  *  General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public
00022  *  License along with this software. If not, see
00023  *  <http://www.gnu.org/licenses/>.
00024  *
00025  */
00026 
00027 #ifndef _PREVIEWEDITCPTOOL_H
00028 #define _PREVIEWEDITCPTOOL_H
00029 
00030 #include "Tool.h"
00031 #include "base_wx/wxutils.h"
00032 
00033 #include <panotools/PanoToolsInterface.h>
00034 
00036 enum{
00037     ID_CREATE_CP=wxID_HIGHEST + 301,
00038     ID_REMOVE_CP
00039 };
00040 
00043 class PreviewEditCPTool : public Tool
00044 {
00045 public:
00046     explicit PreviewEditCPTool(ToolHelper *helper) : Tool(helper), m_mouseDown(false), m_menuPopup(false) {};
00048     void Activate();
00050     void ReallyAfterDrawImagesEvent();
00052     void MouseMoveEvent(double x, double y, wxMouseEvent & e);
00054     void MouseButtonEvent(wxMouseEvent &e);
00056     HuginBase::UIntSet GetFoundCPs() { return m_CPinROI; };
00058     vigra::Rect2D GetSelectedROI();
00060     void SetMenuProcessed();
00061 private:
00063     void FindCPInRect(const hugin_utils::FDiff2D& pos1, const hugin_utils::FDiff2D& pos2);
00065     bool m_mouseDown;
00067     bool m_menuPopup;
00069     hugin_utils::FDiff2D m_startPos;
00071     hugin_utils::FDiff2D m_startPosScreen;
00073     hugin_utils::FDiff2D m_currentPos;
00075     hugin_utils::FDiff2D m_currentPosScreen;
00077     HuginBase::UIntSet m_CPinROI;
00078 };
00079 
00080 #endif
00081 

Generated on 22 Jan 2018 for Hugintrunk by  doxygen 1.4.7