Commit 7631c1bc authored by Dirk Wilden's avatar Dirk Wilden
Browse files

removed makeDefault button from core

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7926 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3c7091bb
......@@ -119,13 +119,11 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
//add buttons at bottom
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QPushButton* makeDef = new QPushButton(tr("Make &Default"));
QPushButton* ok = new QPushButton(tr("&Ok"));
QHBoxLayout* buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(cancel);
buttonLayout->addWidget(makeDef);
buttonLayout->addStretch();
buttonLayout->addWidget(ok);
......@@ -138,7 +136,6 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) );
connect( ok, SIGNAL(clicked()), this, SLOT(accept()) );
connect(makeDef, SIGNAL(clicked()), this, SLOT(slotMakeDefault()) );
}
FileOptionsDialog::~FileOptionsDialog()
......@@ -174,25 +171,3 @@ void FileOptionsDialog::slotPluginChanged(QString _name){
}
void FileOptionsDialog::slotMakeDefault(){
QString filename = OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "OpenFlipper.ini";
INIFile ini;
if ( ! ini.connect(filename,false) ) {
std::cerr << (tr("Failed to connect to ini file %1").arg(filename)).toStdString() << std::endl;
return;
}
for (int i=0; i < boxes_.count(); i++)
ini.add_entry("LoadSave","Extension_" + (boxes_[i])->accessibleName(), boxes_[i]->currentText() );
ini.add_entry("LoadSave","MakeDefault", true );
// close ini file
ini.disconnect();
}
......@@ -52,7 +52,6 @@ class FileOptionsDialog : public QDialog
private slots:
void slotPluginChanged(QString _name);
void slotMakeDefault();
signals:
void setPluginForExtension(QString _extension, int _pluginId );
......
......@@ -127,7 +127,7 @@ int FileOFFPlugin::loadObject(QString _filename) {
} else
triMeshControl = 0;
}
//check if it's actually a triangle mesh
if (triMeshControl != 1){ // 1 == do nothing
......@@ -428,15 +428,15 @@ QWidget* FileOFFPlugin::saveOptionsWidget(QString _currentFilter) {
connect(saveDefaultButton_, SIGNAL(clicked()), this, SLOT(slotSaveDefault()));
saveBinary_->setChecked( OpenFlipperSettings().value("FileOff/Save/Binary",true).toBool() );
saveVertexColor_->setChecked( OpenFlipperSettings().value("FileOff/Save/VertexColor",true).toBool() );
saveFaceColor_->setChecked( OpenFlipperSettings().value("FileOff/Save/FaceColor",true).toBool() );
saveAlpha_->setChecked( OpenFlipperSettings().value("FileOff/Save/Alpha",true).toBool() );
saveNormals_->setChecked( OpenFlipperSettings().value("FileOff/Save/Normals",true).toBool() );
saveTexCoords_->setChecked( OpenFlipperSettings().value("FileOff/Save/TexCoords",true).toBool() );
}
saveBinary_->setChecked( OpenFlipperSettings().value("FileOff/Save/Binary",true).toBool() );
saveVertexColor_->setChecked( OpenFlipperSettings().value("FileOff/Save/VertexColor",true).toBool() );
saveFaceColor_->setChecked( OpenFlipperSettings().value("FileOff/Save/FaceColor",true).toBool() );
saveAlpha_->setChecked( OpenFlipperSettings().value("FileOff/Save/Alpha",true).toBool() );
saveNormals_->setChecked( OpenFlipperSettings().value("FileOff/Save/Normals",true).toBool() );
saveTexCoords_->setChecked( OpenFlipperSettings().value("FileOff/Save/TexCoords",true).toBool() );
return saveOptions_;
}
......@@ -488,16 +488,17 @@ QWidget* FileOFFPlugin::loadOptionsWidget(QString /*_currentFilter*/) {
loadOptions_->setLayout(layout);
connect(loadDefaultButton_, SIGNAL(clicked()), this, SLOT(slotLoadDefault()));
triMeshHandling_->setCurrentIndex(OpenFlipperSettings().value("FileOff/Load/TriMeshHandling",2).toInt() );
loadVertexColor_->setChecked( OpenFlipperSettings().value("FileOff/Load/VertexColor",true).toBool() );
loadFaceColor_->setChecked( OpenFlipperSettings().value("FileOff/Load/FaceColor",true).toBool() );
loadAlpha_->setChecked( OpenFlipperSettings().value("FileOff/Load/Alpha",true).toBool() );
loadNormals_->setChecked( OpenFlipperSettings().value("FileOff/Load/Normals",true).toBool() );
loadTexCoords_->setChecked( OpenFlipperSettings().value("FileOff/Load/TexCoords",true).toBool() );
}
triMeshHandling_->setCurrentIndex(OpenFlipperSettings().value("FileOff/Load/TriMeshHandling",2).toInt() );
loadVertexColor_->setChecked( OpenFlipperSettings().value("FileOff/Load/VertexColor",true).toBool() );
loadFaceColor_->setChecked( OpenFlipperSettings().value("FileOff/Load/FaceColor",true).toBool() );
loadAlpha_->setChecked( OpenFlipperSettings().value("FileOff/Load/Alpha",true).toBool() );
loadNormals_->setChecked( OpenFlipperSettings().value("FileOff/Load/Normals",true).toBool() );
loadTexCoords_->setChecked( OpenFlipperSettings().value("FileOff/Load/TexCoords",true).toBool() );
return loadOptions_;
}
......
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