Commit c5acb425 authored by Jan Möbius's avatar Jan Möbius

Added signals from objects for selectionChanged and visibilityChanged

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7787 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7971da8a
......@@ -219,6 +219,7 @@ bool BaseObject::target() {
void BaseObject::target(bool _target) {
setFlag("target", _target);
emit objectSelectionChanged(id());
}
bool BaseObject::source() {
......@@ -227,6 +228,7 @@ bool BaseObject::source() {
void BaseObject::source(bool _source) {
setFlag("source", _source);
emit objectSelectionChanged(id());
}
bool BaseObject::flag(QString _flag)
......@@ -246,6 +248,7 @@ void BaseObject::setFlag(QString _flag, bool _set)
if (_set)
flags_ << _flag;
}
emit objectSelectionChanged(id());
}
QStringList BaseObject::flags()
......@@ -263,6 +266,7 @@ bool BaseObject::visible() {
void BaseObject::visible(bool _visible) {
visible_ = _visible;
emit visibilityChanged( id() );
}
// ===============================================================================
......
......@@ -190,6 +190,9 @@ class DLLEXPORTONLY BaseObject : public QObject {
* @{ */
//===========================================================================
signals:
void objectSelectionChanged(int _objectId);
public:
/** Is this item selected as a target item?
* Most algorithms operate on target meshes. These meshes are also considered as active.
......@@ -237,6 +240,15 @@ class DLLEXPORTONLY BaseObject : public QObject {
/** @name Object visualization
* @{ */
//===========================================================================
signals:
/** This slot is emitted when the visibility of the object gets changed.
*
* The signal is normally handled by the core to tell the plugins that an object changed its visibility
*
*/
void visibilityChanged(int _objectId);
public :
/// return if object is visible
......
......@@ -196,11 +196,15 @@ void BaseObjectData::path(QString _path ) {
void BaseObjectData::show() {
separatorNode_->set_status( ACG::SceneGraph::BaseNode::Active );
visible_ = true;
emit visibilityChanged( id() );
}
void BaseObjectData::hide() {
separatorNode_->set_status( ACG::SceneGraph::BaseNode::HideSubtree );
visible_ = false;
emit visibilityChanged( id() );
}
bool BaseObjectData::visible(){
......@@ -215,6 +219,8 @@ void BaseObjectData::visible(bool _visible) {
separatorNode_->set_status( ACG::SceneGraph::BaseNode::HideSubtree );
visible_ = _visible;
emit visibilityChanged( id() );
}
SeparatorNode* BaseObjectData::baseNode() {
......
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