Commit 1d10ab99 authored by Dirk Wilden's avatar Dirk Wilden

updated recentfiles

switch saveFunctions back to use only target objects

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3611 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ffe00fad
......@@ -688,7 +688,10 @@ Core::slotRecentOpen(QAction* _action)
QVector< OpenFlipper::Options::RecentFile > recentFiles = OpenFlipper::Options::recentFiles();
for (int i = 0 ; i < recentFiles.size() ; ++i )
if ( recentFiles[i].filename == _action->text() ){
loadObject(recentFiles[i].type, recentFiles[i].filename);
if (recentFiles[i].type == DATA_NONE)
loadSettings( recentFiles[i].filename );
else
loadObject(recentFiles[i].type, recentFiles[i].filename);
break;
}
}
......@@ -985,9 +988,9 @@ void Core::setDescriptions(){
"(only works if GUI is available)",
QString("object-id,filename").split(","),
QString("id of the object, initial filename for the dialog").split(","));
emit setSlotDescription("saveAllObjects()", "Saves all opened objects. Before overwriting the user is asked. "
emit setSlotDescription("saveAllObjects()", "Saves all target objects. "
"If no filename is available a dialog is shown. (only works if GUI is available)",QStringList(), QStringList());
emit setSlotDescription("saveAllObjectsTo()", "Saves all opened objects. The locations can be chosen in dialogs. "
emit setSlotDescription("saveAllObjectsTo()", "Saves all target objects. The locations can be chosen in dialogs. "
"(only works if GUI is available)",QStringList(), QStringList());
emit setSlotDescription("saveSettings()", "Show the dialog to save the current setting. (only works if GUI is available)",QStringList(), QStringList());
//load slots
......
......@@ -128,30 +128,14 @@ void Core::saveAllObjects(){
supportedTypes_[i].plugin->saveOptionsWidget("");
//iterate over all target objects
bool overwrite_all = false;
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ;
o_it != PluginFunctions::objects_end(); ++o_it) {
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());
else{
//ask for overwriting
//save (existing files will be overwritten)
QString filename = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name() ;
QFile file(filename);
if ( file.exists() && !overwrite_all){
int ret = QMessageBox::warning(coreWidget_, tr("File exists"),QString("The file '" +filename+ "' already exists.\n"+
"Do you want to overwrite the file?"),QMessageBox::YesToAll |
QMessageBox::Yes|QMessageBox::No|QMessageBox::NoToAll,QMessageBox::No);
switch(ret){
case QMessageBox::YesToAll: overwrite_all = true;break;
case QMessageBox::Yes: break;
case QMessageBox::No: continue;
case QMessageBox::NoToAll: return;
}
}
// and save
saveObject(o_it->id(),filename);
}
}
......@@ -165,7 +149,7 @@ void Core::saveAllObjectsTo(){
if ( OpenFlipper::Options::gui() ){
if (supportedTypes_.size() != 0){
//iterate over all target objects
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS);
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS);
o_it != PluginFunctions::objects_end(); ++o_it) {
QString filename = o_it->path() + OpenFlipper::Options::dirSeparator() + o_it->name();
saveObjectTo(o_it->id(),filename);
......
Icons/PolyType.png

651 Bytes | W: | H:

Icons/PolyType.png

449 Bytes | W: | H:

Icons/PolyType.png
Icons/PolyType.png
Icons/PolyType.png
Icons/PolyType.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,7 +2,7 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
......@@ -12,16 +12,24 @@
height="50"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45.1"
inkscape:version="0.46"
version="1.0"
sodipodi:docbase="/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Icons"
sodipodi:docname="PolyType.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Icons/PolyType.png"
inkscape:export-filename="/data/home2/wilden/projects/OpenFlipper/OpenFlipper/Icons/PolyType.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4" />
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 25 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="50 : 25 : 1"
inkscape:persp3d-origin="25 : 16.666667 : 1"
id="perspective13" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
......@@ -30,7 +38,7 @@
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="1"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="77.20135"
......@@ -42,7 +50,8 @@
inkscape:window-width="1185"
inkscape:window-height="1010"
inkscape:window-x="245"
inkscape:window-y="142" />
inkscape:window-y="142"
showgrid="false" />
<metadata
id="metadata7">
<rdf:RDF>
......
......@@ -2,7 +2,7 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
......@@ -12,16 +12,24 @@
height="50"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45.1"
inkscape:version="0.46"
version="1.0"
sodipodi:docbase="/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Icons"
sodipodi:docname="TriangleType.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Icons/TriangleType.png"
inkscape:export-filename="/data/home2/wilden/projects/OpenFlipper/OpenFlipper/Icons/TriangleType.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4" />
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 25 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="50 : 25 : 1"
inkscape:persp3d-origin="25 : 16.666667 : 1"
id="perspective8" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
......@@ -30,7 +38,7 @@
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="1"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="77.20135"
......@@ -42,7 +50,8 @@
inkscape:window-width="1185"
inkscape:window-height="1010"
inkscape:window-x="245"
inkscape:window-y="142" />
inkscape:window-y="142"
showgrid="false" />
<metadata
id="metadata7">
<rdf:RDF>
......
Icons/TriangleType.png

1.59 KB | W: | H:

Icons/TriangleType.png

948 Bytes | W: | H:

Icons/TriangleType.png
Icons/TriangleType.png
Icons/TriangleType.png
Icons/TriangleType.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -563,6 +563,8 @@ CoreWidget::updateRecent()
path += "PolyLineType.png"; break;
case DATA_BSPLINE_CURVE:
path += "BSplineCurveType.png"; break;
case DATA_NONE:
path += "folder_grey.png"; break;
default: path = "";
}
recentFilesMenu_->addAction(QIcon(path), recentFiles[i].filename);
......
......@@ -134,7 +134,7 @@ void CoreWidget::setupMenuBar()
//Save object
QAction* AC_Save = new QAction(tr("&Save Object"), this);
AC_Save->setShortcut (Qt::CTRL + Qt::Key_S);
AC_Save->setStatusTip(tr("Save objects"));
AC_Save->setStatusTip(tr("Save currently selected objects"));
AC_Save->setWhatsThis("Saves all currently selected objects");
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-save.png");
AC_Save->setIcon(icon);
......
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