Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95210533
integratorchecker.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Dec 13, 18:46
Size
1 KB
Mime Type
text/x-c
Expires
Sun, Dec 15, 18:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22951434
Attached To
rSYMKIT symkit
integratorchecker.cpp
View Options
#include "integratorchecker.h"
#include <QRadioButton>
#include <QVBoxLayout>
#include "descriptors/oscillateur.h"
void
IntegratorChecker
::
switchToEulerCromer
()
{
desc
->
setIntegrationOperation
(
EULER_CROMER
);
newmark
->
setChecked
(
false
);
}
void
IntegratorChecker
::
switchToNewmark
()
{
desc
->
setIntegrationOperation
(
NEWMARK
);
euler_cromer
->
setChecked
(
false
);
}
IntegratorChecker
::
IntegratorChecker
(
Oscillateur
*
desc
,
QWidget
*
parent
)
:
QGroupBox
(
tr
(
"&Integrators"
),
parent
),
desc
(
desc
)
{
layout
=
new
QVBoxLayout
;
euler_cromer
=
new
QRadioButton
(
tr
(
"&Euler-Cromer"
),
this
);
newmark
=
new
QRadioButton
(
tr
(
"&Newmark"
),
this
);
layout
->
addWidget
(
euler_cromer
);
layout
->
addWidget
(
newmark
);
connect
(
euler_cromer
,
SIGNAL
(
pressed
()),
this
,
SLOT
(
switchToEulerCromer
()));
connect
(
newmark
,
SIGNAL
(
pressed
()),
this
,
SLOT
(
switchToNewmark
()));
euler_cromer
->
setChecked
(
desc
->
getIntegrationOperation
()
==
EULER_CROMER
);
newmark
->
setChecked
(
desc
->
getIntegrationOperation
()
==
NEWMARK
);
setLayout
(
layout
);
}
IntegratorChecker
::~
IntegratorChecker
()
{
delete
euler_cromer
;
delete
newmark
;
}
#include "skactor.h"
#include "specs/describable.h"
Oscillateur
*
IntegratorChecker
::
getOscillator
(
SKActor
*
actor
)
{
Describable
*
d
=
dynamic_cast
<
Describable
*>
(
actor
);
if
(
!
d
)
return
0
;
return
dynamic_cast
<
Oscillateur
*>
(
d
->
getDescriptor
());
}
Event Timeline
Log In to Comment