Windows port

This commit is contained in:
adam 2010-02-26 15:20:27 +00:00
parent 5948a09f3c
commit e058a99023
3 changed files with 8 additions and 8 deletions

View File

@ -556,13 +556,13 @@ void GEOMToolsGUI::OnDeflection()
GEOMToolsGUI_DeflectionDlg * DeflectionDlg = new GEOMToolsGUI_DeflectionDlg GEOMToolsGUI_DeflectionDlg * DeflectionDlg = new GEOMToolsGUI_DeflectionDlg
(SUIT_Session::session()->activeApplication()->desktop()); (SUIT_Session::session()->activeApplication()->desktop());
DeflectionDlg->setDC(aDC); DeflectionDlg->setTheDC(aDC);
double aNewDC = 0.0; double aNewDC = 0.0;
bool ok = false; bool ok = false;
while (!ok) { while (!ok) {
if (DeflectionDlg->exec()) { if (DeflectionDlg->exec()) {
SUIT_OverrideCursor(); SUIT_OverrideCursor();
aNewDC = DeflectionDlg->getDC(); aNewDC = DeflectionDlg->getTheDC();
ok = (1e-07 <= aNewDC && aNewDC <= 1.0); // spinbox can return zero ok = (1e-07 <= aNewDC && aNewDC <= 1.0); // spinbox can return zero
if (ok) { if (ok) {
for (; ic->MoreCurrent(); ic->NextCurrent()) { for (; ic->MoreCurrent(); ic->NextCurrent()) {
@ -628,10 +628,10 @@ void GEOMToolsGUI::OnDeflection()
GEOMToolsGUI_DeflectionDlg* DeflectionDlg = new GEOMToolsGUI_DeflectionDlg GEOMToolsGUI_DeflectionDlg* DeflectionDlg = new GEOMToolsGUI_DeflectionDlg
(SUIT_Session::session()->activeApplication()->desktop()); (SUIT_Session::session()->activeApplication()->desktop());
DeflectionDlg->setDC(aDC); DeflectionDlg->setTheDC(aDC);
if (DeflectionDlg->exec()) { if (DeflectionDlg->exec()) {
SUIT_OverrideCursor(); SUIT_OverrideCursor();
aDC = DeflectionDlg->getDC(); aDC = DeflectionDlg->getTheDC();
while (anAct != NULL) { while (anAct != NULL) {
if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) { if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
// There are no casting to needed actor. // There are no casting to needed actor.

View File

@ -137,12 +137,12 @@ GEOMToolsGUI_DeflectionDlg::~GEOMToolsGUI_DeflectionDlg()
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, Qt does it all for us
} }
double GEOMToolsGUI_DeflectionDlg::getDC() const double GEOMToolsGUI_DeflectionDlg::getTheDC() const
{ {
return SpinBox->text().toDouble(); return SpinBox->text().toDouble();
} }
void GEOMToolsGUI_DeflectionDlg::setDC (const double v) void GEOMToolsGUI_DeflectionDlg::setTheDC (const double v)
{ {
SpinBox->setValue(v); SpinBox->setValue(v);
} }

View File

@ -44,8 +44,8 @@ public:
GEOMToolsGUI_DeflectionDlg( QWidget* ); GEOMToolsGUI_DeflectionDlg( QWidget* );
~GEOMToolsGUI_DeflectionDlg(); ~GEOMToolsGUI_DeflectionDlg();
double getDC() const; double getTheDC() const;
void setDC( const double ); void setTheDC( const double );
private slots: private slots:
void ClickOnHelp(); void ClickOnHelp();