Hugintrunk
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
hugin1
hugin
PreviewEditCPTool.h
Go to the documentation of this file.
1
// -*- c-basic-offset: 4 -*-
2
10
/*
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU General Public
13
* License as published by the Free Software Foundation; either
14
* version 2 of the License, or (at your option) any later version.
15
*
16
* This software is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public
22
* License along with this software. If not, see
23
* <http://www.gnu.org/licenses/>.
24
*
25
*/
26
27
#ifndef _PREVIEWEDITCPTOOL_H
28
#define _PREVIEWEDITCPTOOL_H
29
30
#include "
Tool.h
"
31
#include "
base_wx/wxutils.h
"
32
33
#include <
panotools/PanoToolsInterface.h
>
34
36
enum
{
37
ID_CREATE_CP
=wxID_HIGHEST + 301,
38
ID_REMOVE_CP
39
};
40
43
class
PreviewEditCPTool
:
public
Tool
44
{
45
public
:
46
explicit
PreviewEditCPTool
(
ToolHelper
*
helper
) :
Tool
(helper),
m_mouseDown
(false),
m_menuPopup
(false),
m_line
(false) {};
48
void
Activate
();
50
void
ReallyAfterDrawImagesEvent
();
52
void
MouseMoveEvent
(
double
x,
double
y, wxMouseEvent & e);
54
void
MouseButtonEvent
(wxMouseEvent &e);
56
HuginBase::UIntSet
GetFoundCPs
() {
return
m_CPinROI
; };
58
vigra::Rect2D
GetSelectedROI
();
60
void
SetMenuProcessed
();
61
private
:
63
void
AddLineCP
(
const
hugin_utils::FDiff2D
& pos1,
const
hugin_utils::FDiff2D
& pos2);
65
void
FindCPInRect
(
const
hugin_utils::FDiff2D
& pos1,
const
hugin_utils::FDiff2D
& pos2);
67
bool
m_mouseDown
;
69
bool
m_menuPopup
;
71
hugin_utils::FDiff2D
m_startPos
;
73
hugin_utils::FDiff2D
m_startPosScreen
;
75
hugin_utils::FDiff2D
m_currentPos
;
77
hugin_utils::FDiff2D
m_currentPosScreen
;
79
HuginBase::UIntSet
m_CPinROI
;
81
bool
m_line
;
82
};
83
84
#endif
85
ToolHelper
Definition:
ToolHelper.h:76
ID_CREATE_CP
Definition:
PreviewEditCPTool.h:37
PreviewEditCPTool::ReallyAfterDrawImagesEvent
void ReallyAfterDrawImagesEvent()
draw selection rectangle
Definition:
PreviewEditCPTool.cpp:58
Tool.h
ID_REMOVE_CP
Definition:
PreviewEditCPTool.h:38
wxutils.h
PreviewEditCPTool::SetMenuProcessed
void SetMenuProcessed()
reset popup menu status
Definition:
PreviewEditCPTool.cpp:248
PreviewEditCPTool::m_currentPosScreen
hugin_utils::FDiff2D m_currentPosScreen
current position of selection in screen coordinates
Definition:
PreviewEditCPTool.h:77
PreviewEditCPTool::AddLineCP
void AddLineCP(const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
called to add line control point
Definition:
PreviewEditCPTool.cpp:253
PreviewEditCPTool::MouseMoveEvent
void MouseMoveEvent(double x, double y, wxMouseEvent &e)
mouse move handling
Definition:
PreviewEditCPTool.cpp:99
HuginBase::UIntSet
std::set< unsigned int > UIntSet
Definition:
PanoramaData.h:51
Tool::helper
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition:
Tool.h:102
PreviewEditCPTool::MouseButtonEvent
void MouseButtonEvent(wxMouseEvent &e)
mouse button handling
Definition:
PreviewEditCPTool.cpp:112
hugin_utils::TDiff2D
Definition:
hugin_math.h:82
Tool
Definition:
Tool.h:42
PanoToolsInterface.h
PreviewEditCPTool::m_currentPos
hugin_utils::FDiff2D m_currentPos
current position of selection
Definition:
PreviewEditCPTool.h:75
PreviewEditCPTool::m_line
bool m_line
if selecting a rectangle or a line
Definition:
PreviewEditCPTool.h:81
PreviewEditCPTool::m_menuPopup
bool m_menuPopup
true, when popup menu is shown, this is to ignore a mouse event when the popup menu is closed ...
Definition:
PreviewEditCPTool.h:69
PreviewEditCPTool::Activate
void Activate()
activate the tool
Definition:
PreviewEditCPTool.cpp:48
PreviewEditCPTool
Tool to delete all cp in a selected rectangle.
Definition:
PreviewEditCPTool.h:43
PreviewEditCPTool::m_mouseDown
bool m_mouseDown
mouse down status
Definition:
PreviewEditCPTool.h:67
PreviewEditCPTool::m_startPos
hugin_utils::FDiff2D m_startPos
position where the marking starts
Definition:
PreviewEditCPTool.h:71
PreviewEditCPTool::PreviewEditCPTool
PreviewEditCPTool(ToolHelper *helper)
Definition:
PreviewEditCPTool.h:46
PreviewEditCPTool::GetFoundCPs
HuginBase::UIntSet GetFoundCPs()
return set of found control points
Definition:
PreviewEditCPTool.h:56
PreviewEditCPTool::m_CPinROI
HuginBase::UIntSet m_CPinROI
contains the found cp
Definition:
PreviewEditCPTool.h:79
PreviewEditCPTool::FindCPInRect
void FindCPInRect(const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
search for control points in selected rectangle
Definition:
PreviewEditCPTool.cpp:188
PreviewEditCPTool::GetSelectedROI
vigra::Rect2D GetSelectedROI()
returns selected ROI
Definition:
PreviewEditCPTool.cpp:234
PreviewEditCPTool::m_startPosScreen
hugin_utils::FDiff2D m_startPosScreen
position where the marking starts in screen coordinates
Definition:
PreviewEditCPTool.h:73
Generated on Sun Nov 17 2024 01:25:36 for Hugintrunk by
1.8.5