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