52 #include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
53 #include <OpenFlipper/INIFile/INIFile.hh>
56 #include <ACG/GL/ShaderCache.hh>
58 #include "optionsWidget.hh"
60 OptionsWidget::OptionsWidget(std::vector<PluginInfo>& _plugins, std::vector<KeyBinding>& _core, InverseKeyMap& _invKeys, QWidget *parent)
65 progressDialog_(NULL),
66 restartRequired_(false),
71 connect(okButton,SIGNAL(clicked()),
this,SLOT(
slotOk()));
72 connect(applyButton,SIGNAL(clicked()),
this,SLOT(
slotApply()));
73 connect(cancelButton,SIGNAL(clicked()),
this,SLOT(
slotCancel()));
75 connect(updateButton,SIGNAL(clicked()),
this,SLOT(
slotGetUpdates()));
76 updateButton->setEnabled(
false);
82 connect( restrictFPS, SIGNAL(toggled(
bool)), FPS, SLOT(setEnabled(
bool)) );
84 connect( availDrawModes, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(
viewerSettingsChanged(QListWidgetItem*)) );
90 connect(stereoOpengl, SIGNAL(clicked()),
92 connect(stereoAnaglyph, SIGNAL(clicked()),
94 connect(stereoCustomAnaglyph, SIGNAL(clicked()),
97 connect(focalDistance, SIGNAL(sliderReleased()),
99 connect(eyeDistance, SIGNAL(editingFinished()),
102 ACG::SceneGraph::DrawModes::ModeFlagSet mode(2);
103 for (uint i=1; i < 22; i++) {
104 std::vector< QString > dm = drawModeToDescriptions( mode );
106 if ( !dm.empty() && dm[0].trimmed() !=
""){
107 QListWidgetItem* item =
new QListWidgetItem(dm[0]);
109 item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable);
111 item->setCheckState(Qt::Unchecked);
113 availDrawModes->addItem( item );
119 defaultProjectionMode_.resize(4);
120 defaultViewingDirections_.resize(4);
121 defaultRotationLocks_.resize(4);
124 viewerList->addItem(
"Viewer " + QString::number(i+1) );
128 pluginOptionsLayout =
new QVBoxLayout;
129 pluginOptions->setLayout( pluginOptionsLayout );
131 networkMan_ =
new QNetworkAccessManager(
this);
134 connect(networkMan_, SIGNAL(finished(QNetworkReply *)),
135 this, SLOT(httpRequestFinished(QNetworkReply *)));
136 connect(networkMan_,SIGNAL(authenticationRequired(QNetworkReply* , QAuthenticator *)),
141 connect(defaultColorButton, SIGNAL(clicked()),
this, SLOT(getDefaultColor()) );
144 connect(clearSettingsButton, SIGNAL(clicked()),
this, SLOT(
slotClearSettings()));
145 connect(clearINIButton, SIGNAL(clicked()),
this, SLOT(
slotClearINI()));
148 #ifdef OPENFLIPPER_BUILD_APP_STORE_COMPLIANT
150 tabWidget->removeTab(tabWidget->count()-1);
155 QColor newColor = QColorDialog::getColor (
OpenFlipperSettings().value(
"Core/Gui/glViewer/defaultBackgroundColor").value<QColor>() );
157 backgroundColor_ = newColor;
159 QPixmap color(16,16);
160 color.fill( newColor );
161 backgroundButton->setIcon( QIcon(color) );
164 void OptionsWidget::getDefaultColor(){
165 QColor newColor = QColorDialog::getColor ( OpenFlipper::Options::defaultColor() );
167 OpenFlipper::Options::defaultColor( newColor) ;
169 QPixmap color(16,16);
170 color.fill( OpenFlipper::Options::defaultColor() );
171 defaultColorButton->setIcon( QIcon(color) );
180 if ( !updatingViewerSettings_ ){
182 std::vector< QString > mode;
184 for (
int i=0; i < availDrawModes->count(); i++)
185 if (availDrawModes->item(i)->checkState() == Qt::Checked)
186 mode.push_back( availDrawModes->item(i)->text() );
188 defaultDrawModes_[ viewerList->currentRow() ] = descriptionsToDrawMode(mode);
189 defaultProjectionMode_[ viewerList->currentRow() ] = projectionBox->currentIndex() ;
190 defaultViewingDirections_[ viewerList->currentRow() ] = directionBox->currentIndex();
191 defaultRotationLocks_[ viewerList->currentRow() ] = lockRotationBox->isChecked();
193 if ( lockRotationBox->isChecked() )
194 std::cerr <<
"locked" << std::endl;
196 std::cerr <<
"unlocked" << std::endl;
203 if (stereoCustomAnaglyph->isChecked()) {
204 stackedWidget->setCurrentIndex(0);
205 customAnaGlyphSettings->setVisible(
true);
207 stackedWidget->setCurrentIndex(0);
208 customAnaGlyphSettings->setVisible(
false);
215 void OptionsWidget::slotTranslationIndexChanged(
int ) {
221 updatingViewerSettings_ =
true;
223 for (
int i = 0 ; i < availDrawModes->count(); ++i )
224 availDrawModes->item( i )->setCheckState(Qt::Unchecked) ;
227 std::vector< QString > dm = drawModeToDescriptions( defaultDrawModes_[_row] );
229 for (uint i=0; i < dm.size(); i++){
231 QList< QListWidgetItem* > found = availDrawModes->findItems(dm[i],Qt::MatchExactly);
232 for(
int k=0; k < found.count(); k++)
233 (found[k])->setCheckState(Qt::Checked);
237 if ( defaultProjectionMode_[_row] )
238 projectionBox->setCurrentIndex( 1 );
240 projectionBox->setCurrentIndex( 0 );
242 directionBox->setCurrentIndex( defaultViewingDirections_[_row] );
244 lockRotationBox->setChecked( defaultRotationLocks_[_row] );
246 updatingViewerSettings_ =
false;
249 void OptionsWidget::showEvent ( QShowEvent * ) {
252 fullscreen->setChecked(
OpenFlipperSettings().value(
"Core/Gui/fullscreen",
false).toBool() );
254 toolbox->setChecked( !
OpenFlipperSettings().value(
"Core/Gui/ToolBoxes/hidden",
false).toBool() );
256 iconSmall->setChecked(
false);
257 iconNormal->setChecked(
false);
258 iconDefault->setChecked(
false);
261 case 1 : iconSmall->setChecked(
true);
break;
262 case 2 : iconNormal->setChecked(
true);
break;
263 default : iconDefault->setChecked(
true);
break;
266 loggerHidden->setChecked( OpenFlipper::Options::loggerState() == OpenFlipper::Options::Hidden);
268 loggerInScene->setChecked( OpenFlipper::Options::loggerState() == OpenFlipper::Options::InScene);
269 enableLogFile->setChecked(
OpenFlipperSettings().value(
"Core/Log/logFileEnabled",
true).toBool() );
274 rbReloadShaders->setChecked(
OpenFlipperSettings().value(
"Core/File/ReloadShaders",
false).toBool()) ;
275 leShaderOutputDir->setText(
OpenFlipperSettings().value(
"Core/File/ShaderOutputDir",
"").toString());
276 allTarget->setChecked(
OpenFlipperSettings().value(
"Core/File/AllTarget",
false).toBool() );
280 toolBoxOrientation->setCurrentIndex((
OpenFlipperSettings().value(
"Core/Gui/ToolBoxes/ToolBoxOnTheRight",
true).toBool() ? 0 : 1));
282 pickToolbarInScene->setChecked(
OpenFlipperSettings().value(
"Core/Gui/ToolBars/PickToolbarInScene",
true).toBool());
287 if(!OpenFlipper::Options::glStereo()) {
288 stereoOpengl->setDisabled(
true);
290 stereoOpengl->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::OpenGL);
293 stereoAnaglyph->setChecked (OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphRedCyan);
294 stereoCustomAnaglyph->setChecked (OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphCustom);
296 eyeDistance->setValue (
OpenFlipperSettings().value(
"Core/Stereo/EyeDistance").toDouble() );
297 focalDistance->setValue (
OpenFlipperSettings().value(
"Core/Stereo/FocalDistance").toDouble() * 1000);
300 customAnaGlyphSettings->setVisible(
false);
302 stackedWidget->setCurrentIndex(0);
304 if (stereoCustomAnaglyph->isChecked())
305 customAnaGlyphSettings->setVisible(
true);
307 std::vector<float> mat = OpenFlipper::Options::anaglyphLeftEyeColorMatrix ();
308 lcm0->setValue (mat[0]);
309 lcm1->setValue (mat[1]);
310 lcm2->setValue (mat[2]);
311 lcm3->setValue (mat[3]);
312 lcm4->setValue (mat[4]);
313 lcm5->setValue (mat[5]);
314 lcm6->setValue (mat[6]);
315 lcm7->setValue (mat[7]);
316 lcm8->setValue (mat[8]);
318 mat = OpenFlipper::Options::anaglyphRightEyeColorMatrix ();
319 rcm0->setValue (mat[0]);
320 rcm1->setValue (mat[1]);
321 rcm2->setValue (mat[2]);
322 rcm3->setValue (mat[3]);
323 rcm4->setValue (mat[4]);
324 rcm5->setValue (mat[5]);
325 rcm6->setValue (mat[6]);
326 rcm7->setValue (mat[7]);
327 rcm8->setValue (mat[8]);
329 noMousePick->setChecked ( !
OpenFlipperSettings().value(
"Core/Gui/glViewer/stereoMousePick",
true).toBool() );
330 nativeMouse->setChecked (
OpenFlipperSettings().value(
"Core/Gui/glViewer/nativeMouse",
false).toBool() );
336 updateUser->setText(
OpenFlipperSettings().value(
"Core/Update/UserName",
"anonymous").toString() );
337 updatePass->setText(
OpenFlipperSettings().value(
"Core/Update/Pass",
"anonymous").toString() );
341 slotDebugging->setChecked(OpenFlipper::Options::doSlotDebugging());
346 keyTree->disconnect();
348 connect(keyTree, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
351 connect(keyTree, SIGNAL(itemDoubleClicked (QTreeWidgetItem*,
int)),
355 connect(shortcutButton, SIGNAL(keyChanged()),
this, SLOT(
updateShortcut()) );
360 wZoomFactor->setValue(
OpenFlipperSettings().value(
"Core/Mouse/Wheel/ZoomFactor").toDouble() );
361 wZoomFactorShift->setValue(
OpenFlipperSettings().value(
"Core/Mouse/Wheel/ZoomFactorShift").toDouble() );
362 invertMouseWheelBox->setChecked(
OpenFlipperSettings().value(
"Core/Mouse/Wheel/Invert").toBool() );
364 wheelBox->setChecked(
OpenFlipperSettings().value(
"Core/Gui/glViewer/showControlWheels").toBool() );
367 fieldOfView->setValue(
OpenFlipperSettings().value(
"Core/Projection/FOVY", 45.0).toDouble() );
369 restrictFPS->setChecked(
OpenFlipperSettings().value(
"Core/Gui/glViewer/restrictFrameRate",
false).toBool() );
372 minimalSceneSize->setValue(
OpenFlipperSettings().value(
"Core/Gui/glViewer/minimalSceneSize",0.1).toDouble());
374 QPixmap color(16,16);
375 color.fill(
OpenFlipperSettings().value(
"Core/Gui/glViewer/defaultBackgroundColor").value<QColor>() );
377 backgroundButton->setIcon( QIcon(color) );
379 color.fill( OpenFlipper::Options::defaultColor() );
380 defaultColorButton->setIcon( QIcon(color) );
382 randomDefaultColor->setChecked( OpenFlipper::Options::randomDefaultColor() );
384 viewerList->setCurrentRow(0);
387 defaultDrawModes_[i] = OpenFlipper::Options::defaultDrawMode(i);
388 defaultProjectionMode_[i] = OpenFlipper::Options::defaultPerspectiveProjectionMode(i);
389 defaultViewingDirections_[i] = OpenFlipper::Options::defaultViewingDirection(i);
390 defaultRotationLocks_[i] = OpenFlipper::Options::defaultLockRotation(i);
395 viewerLayout->setCurrentIndex( OpenFlipper::Options::defaultViewerLayout() );
397 if (
OpenFlipperSettings().value(
"Core/Language/Translation",
"en_US").toString() ==
"en_US")
398 translation->setCurrentIndex(0);
399 else if (
OpenFlipperSettings().value(
"Core/Language/Translation",
"en_US").toString() ==
"de_DE")
400 translation->setCurrentIndex(1);
402 translation->setCurrentIndex(2);
405 connect(translation, SIGNAL(currentIndexChanged(
int)),
this, SLOT(slotTranslationIndexChanged(
int)));
415 QString fileName = QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() +
416 ".OpenFlipper" + OpenFlipper::Options::dirSeparator() +
"Versions.ini" ;
422 QString systemString =
"";
424 if ( OpenFlipper::Options::isWindows() ) {
425 systemString =
"VersionWindows";
426 }
else if (OpenFlipper::Options::isLinux()) {
427 systemString =
"VersionLinux";
429 std::cerr <<
"Unsupported platform for update" << std::endl;
434 updateList->setRowCount(
int(1 + plugins_.size()) );
435 updateList->setColumnCount(3);
439 header <<
"Component" <<
"current Version" <<
"latest Version" ;
440 updateList->setHorizontalHeaderLabels(header);
442 QBrush currentBrush(Qt::white);
444 QTableWidgetItem * newItem = 0;
451 if (
isNewer(OpenFlipper::Options::coreVersion(),coreVersion) ) {
452 currentBrush.setColor(Qt::red);
454 }
else if (
isNewer(coreVersion , OpenFlipper::Options::coreVersion()) )
455 currentBrush.setColor(Qt::blue);
457 currentBrush.setColor(Qt::green);
459 newItem =
new QTableWidgetItem( coreVersion );
464 currentBrush.setColor(Qt::yellow);
466 newItem =
new QTableWidgetItem(
"Not Available" );
469 newItem->setBackground(currentBrush);
470 updateList->setItem(0, 2, newItem);
472 newItem =
new QTableWidgetItem( OpenFlipper::Options::coreVersion() );
473 newItem->setBackground(currentBrush);
474 updateList->setItem(0, 1, newItem);
476 newItem =
new QTableWidgetItem(
"Core" );
477 newItem->setBackground(currentBrush);
478 updateList->setItem(0, 0, newItem);
481 for ( uint i = 0 ; i < plugins_.size(); ++i ) {
482 QString latestVersion;
488 if (
isNewer(plugins_[i].version,latestVersion) ) {
489 currentBrush.setColor(Qt::red);
490 QFileInfo pluginFile(plugins_[i].path );
492 }
else if (
isNewer(latestVersion,plugins_[i].version) )
493 currentBrush.setColor(Qt::blue);
495 currentBrush.setColor(Qt::green);
497 newItem =
new QTableWidgetItem( latestVersion );
502 currentBrush.setColor(Qt::yellow);
504 newItem =
new QTableWidgetItem(
"Not Available" );
507 newItem->setBackground(currentBrush);
508 updateList->setItem( i + 1 , 2, newItem);
510 newItem =
new QTableWidgetItem( plugins_[i].version );
511 newItem->setBackground(currentBrush);
512 updateList->setItem( i + 1 , 1, newItem);
514 newItem =
new QTableWidgetItem( plugins_[i].name );
515 newItem->setBackground(currentBrush);
516 updateList->setItem( i + 1 , 0, newItem);
519 updateList->resizeColumnsToContents();
525 void OptionsWidget::initPluginOptions(){
527 pluginList->disconnect();
529 connect(pluginList, SIGNAL( currentTextChanged(
const QString&) ),
this, SLOT( slotShowPluginOptions(
const QString&) ) );
534 for ( uint i = 0 ; i < plugins_.size(); ++i )
535 if (plugins_[i].optionsWidget != 0){
537 pluginList->addItem( plugins_[i].name );
540 if ( pluginList->count() > 0)
541 pluginList->setCurrentRow(0);
544 void OptionsWidget::slotShowPluginOptions(
const QString& _pluginName ){
547 for (
int i = 0; i < pluginOptionsLayout->count(); ++i){
548 QWidget* w = pluginOptionsLayout->itemAt(i)->widget();
553 pluginOptionsLayout->removeItem( pluginOptionsLayout->itemAt(i) );
557 for ( uint i = 0 ; i < plugins_.size(); ++i )
558 if (plugins_[i].optionsWidget != 0 && plugins_[i].name == _pluginName){
560 pluginOptionsLayout->addWidget( plugins_[i].optionsWidget );
561 pluginOptionsLayout->addStretch();
573 if (loggerHidden->isChecked())
574 OpenFlipper::Options::loggerState( OpenFlipper::Options::Hidden );
575 else if (loggerInScene->isChecked())
576 OpenFlipper::Options::loggerState( OpenFlipper::Options::InScene );
596 if (
OpenFlipperSettings().
value(
"Core/Gui/ToolBars/PickToolbarInScene",
true).toBool() != pickToolbarInScene->isChecked() ) {
601 if ( iconDefault->isChecked() )
603 else if ( iconSmall->isChecked() )
605 else if ( iconNormal->isChecked() )
622 OpenFlipper::Options::randomDefaultColor( randomDefaultColor->isChecked() );
625 if (stereoCustomAnaglyph->isChecked ())
626 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphCustom);
627 else if (stereoAnaglyph->isChecked ())
628 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphRedCyan);
630 OpenFlipper::Options::stereoMode(OpenFlipper::Options::OpenGL);
635 std::vector<float> mat (9, 0);
636 mat[0] = lcm0->value ();
637 mat[1] = lcm1->value ();
638 mat[2] = lcm2->value ();
639 mat[3] = lcm3->value ();
640 mat[4] = lcm4->value ();
641 mat[5] = lcm5->value ();
642 mat[6] = lcm6->value ();
643 mat[7] = lcm7->value ();
644 mat[8] = lcm8->value ();
646 OpenFlipper::Options::anaglyphLeftEyeColorMatrix (mat);
648 mat[0] = rcm0->value ();
649 mat[1] = rcm1->value ();
650 mat[2] = rcm2->value ();
651 mat[3] = rcm3->value ();
652 mat[4] = rcm4->value ();
653 mat[5] = rcm5->value ();
654 mat[6] = rcm6->value ();
655 mat[7] = rcm7->value ();
656 mat[8] = rcm8->value ();
658 OpenFlipper::Options::anaglyphRightEyeColorMatrix (mat);
669 OpenFlipper::Options::doSlotDebugging(slotDebugging->isChecked());
673 OpenFlipper::Options::defaultDrawMode( defaultDrawModes_[i], i );
674 OpenFlipper::Options::defaultPerspectiveProjectionMode( defaultProjectionMode_[i], i );
675 OpenFlipper::Options::defaultViewingDirection( defaultViewingDirections_[i], i );
676 OpenFlipper::Options::defaultLockRotation( defaultRotationLocks_[i], i );
679 OpenFlipper::Options::defaultViewerLayout( viewerLayout->currentIndex() );
682 if(restrictFPS->isChecked()) {
692 for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets(); ++i )
694 ((
double) backgroundColor_.greenF()),
695 ((
double) backgroundColor_.blueF()),
698 switch ( translation->currentIndex() ){
706 int restart = QMessageBox::information(
this, tr(
"Restart required!"),
707 tr(
"The changes will take effect after next restart. Do you want to close OpenFlipper now?"),
708 QMessageBox::Yes | QMessageBox::No);
710 if(restart == QMessageBox::Yes) exitOnClose_ =
true;
722 if(exitOnClose_) QCoreApplication::quit();
738 downloadType = VERSIONS_FILE;
739 QString ServerMainURL = updateURL->text();
740 if ( !ServerMainURL.endsWith(
"/") )
741 ServerMainURL +=
"/";
743 ServerMainURL +=
"Versions.ini";
749 std::cerr <<
"Not implemented yet: Get updates" << std::endl;
750 QString url = updateURL->text();
752 if ( !url.endsWith(
"/") )
759 if ( OpenFlipper::Options::isWindows() ) {
761 }
else if ( OpenFlipper::Options::isLinux() ) {
764 std::cerr <<
"Unknown operating system type, aborting update" << std::endl;
768 if ( OpenFlipper::Options::is64bit() ) {
770 }
else if ( OpenFlipper::Options::is32bit() ) {
773 std::cerr <<
"Unknown architecture type, aborting update" << std::endl;
780 std::cerr <<
"Core update not supported!" << std::endl;
789 downloadType = PLUGIN;
796 void OptionsWidget::updateComponent() {
797 std::cerr <<
"Todo : Update component" << std::endl;
801 QString sourceName = QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() +
806 QFileInfo sourceFileInfo(sourceName);
807 QFileInfo targetFileInfo(targetName);
809 std::cerr << sourceName.toStdString() << std::endl;
810 std::cerr << targetName.toStdString() << std::endl;
812 if ( ! sourceFileInfo.exists() ) {
813 statusLabel->setText(tr(
"Download failed!"));
817 if ( ! targetFileInfo.exists() ) {
818 statusLabel->setText(tr(
"plugin target does not exist"));
823 statusLabel->setText(tr(
"Installing new file"));
826 QFile targetFile(targetName);
830 QFile::copy(sourceName,targetName);
833 QFile sourceFile(sourceName);
836 statusLabel->setText(tr(
"updated ") + currentUpdateName_);
844 QStringList latestVersionParts = _latest.split(
'.');
845 QStringList currentVersionParts = _current.split(
'.');
849 for (
int i = 0 ; i < latestVersionParts.size(); ++i ) {
851 if ( i+1 > currentVersionParts.size() ) {
858 double latest = latestVersionParts[i].toInt(&ok);
859 double current = currentVersionParts[i].toInt(&ok);
862 std::cerr <<
"Error when parsing version strings!" << std::endl;
864 if ( latest > current ) {
876 QString fileName = QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() +
877 ".OpenFlipper" + OpenFlipper::Options::dirSeparator() +
"Versions.ini" ;
880 if ( ! ini.
connect(fileName,
false) ) {
881 std::cerr <<
"Failed to connect to Versions ini file" << std::endl;
885 statusLabel->setText(tr(
"Checking for new versions"));
887 bool newerVersionsAvailable =
false;
889 QString systemString =
"";
890 if ( OpenFlipper::Options::isWindows() ) {
891 systemString =
"VersionWindows";
892 }
else if (OpenFlipper::Options::isLinux()) {
893 systemString =
"VersionLinux";
895 std::cerr <<
"Unsupported platform for update" << std::endl;
901 if ( ini.
get_entry(coreVersion,
"Core" , systemString )) {
902 if (
isNewer( OpenFlipper::Options::coreVersion(), coreVersion ) ) {
903 newerVersionsAvailable =
true;
907 for ( uint i = 0 ; i < plugins_.size(); ++i ) {
908 QString latestVersion;
909 if ( ini.
get_entry(latestVersion, plugins_[i].name , systemString )) {
910 if (
isNewer( plugins_[i].version, latestVersion ) )
911 newerVersionsAvailable =
true;
915 if ( newerVersionsAvailable ) {
916 statusLabel->setText(tr(
"Updates found"));
918 statusLabel->setText(tr(
"No updates found"));
928 if (stereoCustomAnaglyph->isChecked ())
929 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphCustom);
930 else if (stereoAnaglyph->isChecked ())
931 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphRedCyan);
933 OpenFlipper::Options::stereoMode(OpenFlipper::Options::OpenGL);
950 QMessageBox::information(
this, tr(
"Restart required!"),
951 tr(
"The changes will take effect after next restart."));
953 OpenFlipper::Options::deleteIniFile(
true);
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
QStringList updatedPlugins_
void slotGetUpdates()
Download updates.
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
void disconnect()
Remove connection of this object to a file.
void slotClearINI()
Clear OpenFlipper INI.
void slotReloadShaders()
Clear the Shader Cache.
void startDownload(QString _url)
Starts the download of the given file.
void keyTreeItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
keyBinding TreeWidget-Item changed
void restoreKeyPresets()
restore keyBinding Presets
bool connect(const QString &name, const bool create)
Connect INIFile object with given filename.
bool isNewer(QString _current, QString _latest)
Compares two version strings and returns if a newer Version is available.
void slotOk()
call slotApply and hide widget
QString currentUpdateName_
bool get_entry(QString &_val, const QString &_section, const QString &_key) const
Access to a string entry.
void slotApply()
Update Options and tell others about changed Options.
void slotPreviewStereoSettings(int _tmpParam=0)
void slotCheckUpdates()
Checks for updates.
bool is_connected() const
Check if object is connected to file.
Class for the handling of simple configuration files.
void getBackgroundColor()
open a dialog to determine the color
void slotClearSettings()
Clear all OpenFlipper settings.
int viewers()
Get the number of viewers.
static ShaderCache * getInstance()
Return instance of the ShaderCache singleton.
void clearCache()
Delete all cached shaders.
void slotCancel()
Only hide widget.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Add normals to mesh item (vertices/faces)
void updateVersionsTable()
Redraws the version table.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
void updateShortcut()
check if the shortcut exists and add it if not
void authentication(QNetworkReply *_reply, QAuthenticator *_authenticator)
authentication
void initKeyTree()
init the TreeWidget containing the keyBindings
void setDebugOutputDir(const char *_outputDir)
Enable debug output of generated shaders to specified directory.
void keyTreeDoubleClicked(QTreeWidgetItem *_item, int col)
doubleclick in the keyTree
void compareVersions()
Compares the versions from the downloaded Versions file with the current versions.
void viewerSettingsChanged(QListWidgetItem *_item)
remember user changes to viewer properties
void switchStackedWidget()
Switch between the stacked widgets of the stereo settings.
void setTimeCheck(bool _on)
enable or disable checking of the time step of each file
void applyShortcuts()
check which of the shortcuts changed and inform the core about the change
ACG::Vec4f backgroundColor()
Get current background color.
void updateViewerSettings(int _row)
update the dialog if the selected viewer changes