66 #include <OpenFlipper/common/RecentFiles.hh>
71 void Core::writeObjFile(QString _filename,
bool _relativePaths,
bool _targetOnly, std::map<int,QString>& _fileMapping)
74 std::string fname = _filename.toStdString();
75 std::fstream out(fname.c_str(), std::ios_base::out);
78 emit
log(
LOGERR,tr(
"Cannot open to obj file") + _filename);
83 if ( OpenFlipper::Options::gui() )
85 coreWidget_->statusMessage( tr(
"Saving obj File ") + _filename +
" ...");
100 std::map<int,QString>::iterator f = _fileMapping.find(o_it->id());
101 if(f == _fileMapping.end()) {
102 file = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name();
107 if (QFile(file).exists())
112 int prefixLen = _filename.section(OpenFlipper::Options::dirSeparator(),0,-2).length();
113 file.remove(0, prefixLen);
118 out <<
"call " << file.toStdString() <<
"\n";
124 if ( OpenFlipper::Options::gui() )
126 coreWidget_->statusMessage( tr(
"Saving obj File ") + _filename + tr(
" ... done"), 4000);
const QStringList ALL_OBJECTS
Iterable object range.
void writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly, std::map< int, QString > &_fileMapping)
Write current status to obj file (Application and File Options)
const QStringList TARGET_OBJECTS("target")
Iterable object range.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
Status is processing and blocked system will not allow interaction (red light)
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
QStringList IteratorRestriction
Iterable object range.
Status is ready (green light)