Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit d297815d authored by saubatn's avatar saubatn
Browse files

UPDATED Action MoveFrame -> EditFrame

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2177 ec899d31-69d1-42ba-9299-647d76f65fb3
parent cf5b30b8
......@@ -24,7 +24,7 @@
****************************************************************************/
// Local
#include "MoveFrame.h"
#include "EditFrame.h"
// CamiTK
#include <InteractiveViewer.h>
......@@ -53,7 +53,7 @@ using namespace camitk;
// --------------- constructor -------------------
MoveFrame::MoveFrame(ActionExtension* extension) : Action(extension) {
EditFrame::EditFrame(ActionExtension* extension) : Action(extension) {
setName("Edit Frame");
setDescription(tr("This action allow to edit a component's frame from its parent frame (or the world frame if it has no parent) by setting translations and rotation parameters."));
setComponent("Component");
......@@ -71,7 +71,7 @@ MoveFrame::MoveFrame(ActionExtension* extension) : Action(extension) {
// --------------- init -------------------
void MoveFrame::init() {
void EditFrame::init() {
dialog = new QDialog();
//-- init user interface
......@@ -113,13 +113,13 @@ void MoveFrame::init() {
// --------------- destructor -------------------
MoveFrame::~MoveFrame() {
EditFrame::~EditFrame() {
if (dialog)
delete dialog;
}
// --------------- getWidget -------------------
QWidget * MoveFrame::getWidget() {
QWidget * EditFrame::getWidget() {
if (!dialog)
init();
......@@ -167,7 +167,7 @@ QWidget * MoveFrame::getWidget() {
}
//--------------- changeParent -------------
void MoveFrame::changeParent() {
void EditFrame::changeParent() {
if (inputFrame != NULL) {
QString parentName = ui.parentFrameComboBox->currentText();
if(parentName == "World"){ // no parent frame ...
......@@ -192,7 +192,7 @@ void MoveFrame::changeParent() {
}
//--------------- reset -------------
void MoveFrame::reset() {
void EditFrame::reset() {
// reset all values to 0.0
ui.tX->setValue(0.0);
......@@ -207,7 +207,7 @@ void MoveFrame::reset() {
//--------------- apply ------------
Action::ApplyStatus MoveFrame::apply() {
Action::ApplyStatus EditFrame::apply() {
inputFrame = dynamic_cast<Component *> (getTargets().last());
inputFrame->setTransformRotationVTK(ui.rX->getValue(), ui.rY->getValue(), ui.rZ->getValue());
......@@ -220,7 +220,7 @@ Action::ApplyStatus MoveFrame::apply() {
}
//--------------- save ------------
void MoveFrame::save() {
void EditFrame::save() {
QString filename = QFileDialog::getSaveFileName(NULL, "Save file", ".frame");
QFile file(filename);
......@@ -274,7 +274,7 @@ void MoveFrame::save() {
}
//--------------- load ------------
void MoveFrame::load(){
void EditFrame::load(){
// choose the file to open
QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open Frame File"), ".frame", ".frame");
......
......@@ -23,8 +23,8 @@
* $CAMITK_LICENCE_END$
****************************************************************************/
#ifndef MOVEFRAME_H
#define MOVEFRAME_H
#ifndef EDITFRAME_H
#define EDITFRAME_H
#include "Action.h"
#include "Component.h"
......@@ -40,15 +40,15 @@
/** This action allows you to apply a linear transformation
* (translation,rotation around axes) on the top level selected Frame
*/
class MoveFrame : public camitk::Action {
class EditFrame : public camitk::Action {
Q_OBJECT
public:
/// the constructor
MoveFrame(camitk::ActionExtension*);
EditFrame(camitk::ActionExtension*);
/// Destructor
virtual ~MoveFrame();
virtual ~EditFrame();
/// this method creates and returns the widget containing the user interface for the action
virtual QWidget * getWidget();
......@@ -95,4 +95,4 @@ private:
};
#endif // MOVEFRAME_H
#endif // EDITFRAME_H
......@@ -25,7 +25,7 @@
#include "TestFrameExtension.h"
// include generated actions headers
#include "MoveFrame.h"
#include "EditFrame.h"
#include "DisplayFrame.h"
// --------------- declare the extension -------------------
......@@ -34,7 +34,7 @@ Q_EXPORT_PLUGIN2(testframeextension, TestFrameExtension);
// --------------- getActions -------------------
void TestFrameExtension::init() {
// Creating and registering the instance of MoveFrame
registerNewAction(MoveFrame);
registerNewAction(EditFrame);
registerNewAction(DisplayFrame);
}
......
......@@ -46,24 +46,19 @@
<source>TransformDialog</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="39"/>
<source>Translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="69"/>
<source>Translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="89"/>
<source>SetTranslation</source>
<location filename="../../MoveFrame.ui" line="244"/>
<source>Parent Frame Component</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="101"/>
<source>Rotation</source>
<location filename="../../MoveFrame.ui" line="254"/>
<source>Set Parent Frame</source>
<translation type="unfinished"></translation>
</message>
<message>
......@@ -76,34 +71,29 @@
<source>Set Rotation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="169"/>
<source>Reset</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="192"/>
<source>Set Transform</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="220"/>
<source>Save Transform</source>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="62"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Description:&lt;/span&gt; This action allows you to edit the selected component&apos;s frame. &lt;/p&gt;&lt;p&gt;Remember a frame is a 3D space transform represented as a 4x4 matrix in homogeneous coordinates, which stands for the 3D position and orientation of the component relatively to its frame parent component.&lt;/p&gt;&lt;p&gt;Given a frame, we apply first the rotation then the translation. &lt;/p&gt;&lt;p&gt;Using this action you may edit the selected component&apos;s frame, ie:&lt;/p&gt;&lt;p&gt;- change its parent frame component.&lt;/p&gt;&lt;p&gt;- change the rotation angles and translation values of the frame.&lt;/p&gt;&lt;p&gt;You may save the frame as a &amp;quot;.frame&amp;quot; file and load it afterwards.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="244"/>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="78"/>
<source>Parent Frame Component</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="254"/>
<source>Set Parent Frame</source>
<location filename="../../MoveFrame.ui" line="220"/>
<source>Save Transform</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="57"/>
<source>This action allow to move a frame from its parent frame (or the world frame if it has no parent) by setting translations and rotation parameters.</source>
<location filename="../../MoveFrame.ui" line="39"/>
<source>Translation</source>
<translation type="unfinished"></translation>
</message>
<message>
......@@ -111,6 +101,11 @@
<source>Test</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="225"/>
<source>Reset all fields to 0.0</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="63"/>
<source>Move</source>
......@@ -136,5 +131,45 @@
<source>Around Z</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="64"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="65"/>
<source>Move</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="66"/>
<source>Visualization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="97"/>
<source>Around X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="98"/>
<source>Around Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="99"/>
<source>Around Z</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="280"/>
<source>Open Frame File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="57"/>
<source>This action allow to move a frame from its parent frame (or the world frame if it has no parent) by setting translations and rotation parameters.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
......@@ -50,25 +50,20 @@
<source>TransformDialog</source>
<translation>Transform Dialogue</translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="39"/>
<source>Translation</source>
<translation></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="69"/>
<source>Translate</source>
<translation>Translater</translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="89"/>
<source>SetTranslation</source>
<location filename="../../MoveFrame.ui" line="244"/>
<source>Parent Frame Component</source>
<translation></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="101"/>
<source>Rotation</source>
<translation></translation>
<location filename="../../MoveFrame.ui" line="254"/>
<source>Set Parent Frame</source>
<translation>Initialiser Parent Frame</translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="131"/>
......@@ -80,41 +75,41 @@
<source>Set Rotation</source>
<translation>Initialiser Rotation</translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="169"/>
<source>Reset</source>
<translation></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="192"/>
<source>Set Transform</source>
<translation>Initialiser Transform</translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="220"/>
<source>Save Transform</source>
<translation>Sauver Transform</translation>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="62"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Description:&lt;/span&gt; This action allows you to edit the selected component&apos;s frame. &lt;/p&gt;&lt;p&gt;Remember a frame is a 3D space transform represented as a 4x4 matrix in homogeneous coordinates, which stands for the 3D position and orientation of the component relatively to its frame parent component.&lt;/p&gt;&lt;p&gt;Given a frame, we apply first the rotation then the translation. &lt;/p&gt;&lt;p&gt;Using this action you may edit the selected component&apos;s frame, ie:&lt;/p&gt;&lt;p&gt;- change its parent frame component.&lt;/p&gt;&lt;p&gt;- change the rotation angles and translation values of the frame.&lt;/p&gt;&lt;p&gt;You may save the frame as a &amp;quot;.frame&amp;quot; file and load it afterwards.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="244"/>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="78"/>
<source>Parent Frame Component</source>
<translation></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.ui" line="254"/>
<source>Set Parent Frame</source>
<translation>Initialiser Parent Frame</translation>
<location filename="../../MoveFrame.ui" line="220"/>
<source>Save Transform</source>
<translation>Sauver Transform</translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="57"/>
<source>This action allow to move a frame from its parent frame (or the world frame if it has no parent) by setting translations and rotation parameters.</source>
<translation>Cette action permet de déplacer un cadre depuis le cadre parent (ou le cadre world si il n&apos;a pas de parent) en initialisant les paramètres de translation et de rotation.</translation>
<location filename="../../MoveFrame.ui" line="39"/>
<source>Translation</source>
<translation></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="62"/>
<source>Test</source>
<translation></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.ui" line="225"/>
<source>Reset all fields to 0.0</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="63"/>
<source>Move</source>
......@@ -140,5 +135,45 @@
<source>Around Z</source>
<translation>Autour de Z</translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="64"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="65"/>
<source>Move</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="66"/>
<source>Visualization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="97"/>
<source>Around X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="98"/>
<source>Around Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="99"/>
<source>Around Z</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../../src/sdk/actions/frame/editframes/MoveFrame.cpp" line="280"/>
<source>Open Frame File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../MoveFrame.cpp" line="57"/>
<source>This action allow to move a frame from its parent frame (or the world frame if it has no parent) by setting translations and rotation parameters.</source>
<translation>Cette action permet de déplacer un cadre depuis le cadre parent (ou le cadre world si il n&apos;a pas de parent) en initialisant les paramètres de translation et de rotation.</translation>
</message>
</context>
</TS>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment