Hugin trunk
0.1
Loading...
Searching...
No Matches
hugin1
base_wx
MyProgressDialog.cpp
Go to the documentation of this file.
1
// -*- c-basic-offset: 4 -*-
2
28
#include "hugin_config.h"
29
#include "
panoinc_WX.h
"
30
31
#include "
MyProgressDialog.h
"
32
33
// provide some more translations for strings in huginbase
34
#if 0
35
_
(
"Sampling points"
);
36
_
(
"Loading image:"
);
37
_
(
"Scaling image:"
);
38
_
(
"sampling points"
);
39
_
(
"extracting good points"
);
40
_
(
"Elapsed time: "
)
41
#endif
42
43
void
ProgressReporterDialog::setMessage
(
const
std::string&
message
,
const
std::string& filename)
44
{
45
setMessage
(
wxString
(
message
.c_str(),
wxConvLocal
),
wxString
(filename.c_str(),
wxConvLocal
));
46
}
47
48
void
ProgressReporterDialog::setMessage
(
const
wxString
&
message
,
const
wxString
& filename)
49
{
50
m_wxmessage
=
message
;
51
m_wxfilename
= filename;
52
updateProgressDisplay
();
53
}
54
55
bool
ProgressReporterDialog::updateDisplay
(
const
wxString
&
message
)
56
{
57
setMessage
(
message
);
58
return
!
m_canceled
;
59
}
60
61
bool
ProgressReporterDialog::updateDisplayValue
(
const
wxString
&
message
,
const
wxString
& filename)
62
{
63
m_wxmessage
=
message
;
64
m_wxfilename
= filename;
65
return
ProgressDisplay::updateDisplayValue();
66
}
67
68
void
ProgressReporterDialog::updateProgressDisplay
()
69
{
70
wxString
msg
;
71
if
(!
m_wxmessage
.empty())
72
{
73
msg
=
wxGetTranslation
(
m_wxmessage
);
74
if
(!
m_wxfilename
.empty())
75
{
76
msg
.Append(
" "
);
77
msg
.Append(
m_wxfilename
);
78
};
79
};
80
if
(ProgressDisplay::m_maximum == 0)
81
{
82
if
(!
Pulse
(
msg
))
83
{
84
m_canceled
=
true
;
85
}
86
}
87
else
88
{
89
if
(!Update(
m_progress
* 100 / ProgressDisplay::m_maximum,
msg
))
90
{
91
m_canceled
=
true
;
92
}
93
}
94
}
MyProgressDialog.h
AppBase::ProgressDisplay::m_progress
int m_progress
Definition
ProgressDisplay.h:74
AppBase::ProgressDisplay::updateDisplay
bool updateDisplay()
updates the display, return true, if update was successful, false if cancel was pressed
Definition
ProgressDisplay.cpp:43
AppBase::ProgressDisplay::m_canceled
bool m_canceled
Definition
ProgressDisplay.h:70
AppBase::ProgressDisplay::updateDisplayValue
bool updateDisplayValue()
Definition
ProgressDisplay.cpp:54
ProgressReporterDialog::setMessage
void setMessage(const std::string &message, const std::string &filename="")
Definition
MyProgressDialog.cpp:43
ProgressReporterDialog::updateProgressDisplay
virtual void updateProgressDisplay()
Template method, updates the display.
Definition
MyProgressDialog.cpp:68
ProgressReporterDialog::m_wxfilename
wxString m_wxfilename
Definition
MyProgressDialog.h:61
ProgressReporterDialog::m_wxmessage
wxString m_wxmessage
Definition
MyProgressDialog.h:60
panoinc_WX.h
include file for the hugin project
threshold
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition
threshold.h:41
Generated on Tue Sep 1 2026 20:52:04 for Hugin trunk by
1.9.8