Commit 92cd4fc8 authored by Jan Möbius's avatar Jan Möbius

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4796 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 95419a63
...@@ -98,7 +98,7 @@ void setSceneGraphRootNode( SeparatorNode* _root_node ) { ...@@ -98,7 +98,7 @@ void setSceneGraphRootNode( SeparatorNode* _root_node ) {
} }
bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object) { bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object) {
for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objects_end(); ++o_it) { for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->picked( _node_idx ) ) { if ( o_it->picked( _node_idx ) ) {
_object = *o_it; _object = *o_it;
return true; return true;
...@@ -111,7 +111,7 @@ bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object) { ...@@ -111,7 +111,7 @@ bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object) {
bool getSourceIdentifiers( std::vector<int>& _identifiers ) { bool getSourceIdentifiers( std::vector<int>& _identifiers ) {
_identifiers.clear(); _identifiers.clear();
for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objects_end(); ++o_it) { for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->source() ) if ( o_it->source() )
_identifiers.push_back ( o_it->id() ); _identifiers.push_back ( o_it->id() );
} }
...@@ -121,7 +121,7 @@ bool getSourceIdentifiers( std::vector<int>& _identifiers ) { ...@@ -121,7 +121,7 @@ bool getSourceIdentifiers( std::vector<int>& _identifiers ) {
bool getTargetIdentifiers( std::vector<int>& _identifiers ) { bool getTargetIdentifiers( std::vector<int>& _identifiers ) {
_identifiers.clear(); _identifiers.clear();
for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objects_end(); ++o_it) { for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->target() ) if ( o_it->target() )
_identifiers.push_back ( o_it->id() ); _identifiers.push_back ( o_it->id() );
} }
...@@ -230,7 +230,7 @@ bool getAllMeshes( std::vector<int>& _identifiers ) { ...@@ -230,7 +230,7 @@ bool getAllMeshes( std::vector<int>& _identifiers ) {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
_identifiers.push_back( o_it->id() ); _identifiers.push_back( o_it->id() );
} }
...@@ -243,7 +243,7 @@ bool get_all_object_identifiers( std::vector<int>& _identifiers ) { ...@@ -243,7 +243,7 @@ bool get_all_object_identifiers( std::vector<int>& _identifiers ) {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
_identifiers.push_back( o_it->id() ); _identifiers.push_back( o_it->id() );
} }
...@@ -473,7 +473,7 @@ int objectCount() { ...@@ -473,7 +473,7 @@ int objectCount() {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
++count; ++count;
} }
...@@ -487,7 +487,7 @@ int targetCount() { ...@@ -487,7 +487,7 @@ int targetCount() {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
++count; ++count;
} }
...@@ -499,7 +499,7 @@ int sourceCount() { ...@@ -499,7 +499,7 @@ int sourceCount() {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::SOURCE_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::SOURCE_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
++count; ++count;
} }
...@@ -511,7 +511,7 @@ int visibleCount() { ...@@ -511,7 +511,7 @@ int visibleCount() {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->visible() ) if ( o_it->visible() )
++count; ++count;
} }
...@@ -531,7 +531,7 @@ void get_all_objects( std::vector < BaseObjectData*>& _objects ) { ...@@ -531,7 +531,7 @@ void get_all_objects( std::vector < BaseObjectData*>& _objects ) {
// find changed manipulator // find changed manipulator
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
_objects.push_back( *o_it ); _objects.push_back( *o_it );
} }
......
...@@ -546,7 +546,7 @@ class DLLEXPORT ObjectIterator { ...@@ -546,7 +546,7 @@ class DLLEXPORT ObjectIterator {
/// Return Iterator to Object End /// Return Iterator to Object End
DLLEXPORT DLLEXPORT
ObjectIterator objects_end(); ObjectIterator objectsEnd();
/** @} */ /** @} */
......
...@@ -168,7 +168,7 @@ BaseObjectData* ObjectIterator::operator*() { ...@@ -168,7 +168,7 @@ BaseObjectData* ObjectIterator::operator*() {
} }
/// Return Iterator to Object End /// Return Iterator to Object End
ObjectIterator objects_end() { ObjectIterator objectsEnd() {
return ObjectIterator(0); return ObjectIterator(0);
} }
......
...@@ -653,7 +653,7 @@ void Core::writeIniFile(QString _filename, ...@@ -653,7 +653,7 @@ void Core::writeIniFile(QString _filename,
QString keyName; QString keyName;
QString sectionName; QString sectionName;
for ( PluginFunctions::ObjectIterator o_it(restriction) ; for ( PluginFunctions::ObjectIterator o_it(restriction) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
QString file = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name(); QString file = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name();
if (QFile(file).exists()){ if (QFile(file).exists()){
// Add a section for this object // Add a section for this object
...@@ -680,7 +680,7 @@ void Core::writeIniFile(QString _filename, ...@@ -680,7 +680,7 @@ void Core::writeIniFile(QString _filename,
// Tell plugins to save their information for the given object // Tell plugins to save their information for the given object
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) o_it != PluginFunctions::objectsEnd(); ++o_it)
emit iniSave( ini , o_it->id() ); emit iniSave( ini , o_it->id() );
} }
......
...@@ -274,7 +274,7 @@ void Core::writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly ...@@ -274,7 +274,7 @@ void Core::writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly
// write all objects to a separate obj file and save external references in the global obj file // write all objects to a separate obj file and save external references in the global obj file
for ( PluginFunctions::ObjectIterator o_it (restriction) ; for ( PluginFunctions::ObjectIterator o_it (restriction) ;
o_it != PluginFunctions::objects_end(); ++o_it) o_it != PluginFunctions::objectsEnd(); ++o_it)
{ {
QString file = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name(); QString file = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name();
......
...@@ -130,7 +130,7 @@ void Core::saveAllObjects(){ ...@@ -130,7 +130,7 @@ void Core::saveAllObjects(){
//iterate over all target objects //iterate over all target objects
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( !QDir(o_it->path()).exists() || o_it->path().trimmed() == "" ) // if path isn't valid use 'save object to' if ( !QDir(o_it->path()).exists() || o_it->path().trimmed() == "" ) // if path isn't valid use 'save object to'
saveObjectTo(o_it->id(),o_it->name()); saveObjectTo(o_it->id(),o_it->name());
...@@ -151,7 +151,7 @@ void Core::saveAllObjectsTo(){ ...@@ -151,7 +151,7 @@ void Core::saveAllObjectsTo(){
if (supportedTypes_.size() != 0){ if (supportedTypes_.size() != 0){
//iterate over all target objects //iterate over all target objects
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS); for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS);
o_it != PluginFunctions::objects_end(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
QString filename = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name(); QString filename = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name();
saveObjectTo(o_it->id(),filename); saveObjectTo(o_it->id(),filename);
} }
......
...@@ -164,7 +164,7 @@ void Core::saveSettings(){ ...@@ -164,7 +164,7 @@ void Core::saveSettings(){
//Iterate over opened objects and save them //Iterate over opened objects and save them
for ( PluginFunctions::ObjectIterator o_it(restriction); for ( PluginFunctions::ObjectIterator o_it(restriction);
o_it != PluginFunctions::objects_end(); ++o_it) o_it != PluginFunctions::objectsEnd(); ++o_it)
{ {
QString filename; QString filename;
......
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