Developer Documentation
OptionsWidget Class Reference
Inheritance diagram for OptionsWidget:

Signals

void applyOptions ()
 
void saveOptions ()
 
void addKeyMapping (int _key, Qt::KeyboardModifiers _modifiers, QObject *_plugin, int _keyBindingID)
 

Public Member Functions

 OptionsWidget (std::vector< PluginInfo > &_plugins, std::vector< KeyBinding > &_core, InverseKeyMap &_invKeys, QWidget *parent=0)
 

Protected Member Functions

void showEvent (QShowEvent *event)
 

Private Types

enum  DOWNLOAD { NONE , VERSIONS_FILE , PLUGIN , WINDOWS_SETUP }
 

Private Slots

void slotOk ()
 call slotApply and hide widget More...
 
void slotApply ()
 Update Options and tell others about changed Options. More...
 
void slotCancel ()
 Only hide widget. More...
 
void slotCheckUpdates ()
 Checks for updates. More...
 
void slotGetUpdates ()
 Download updates. More...
 
void getBackgroundColor ()
 open a dialog to determine the color More...
 
void getDefaultColor ()
 
void keyTreeItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 keyBinding TreeWidget-Item changed More...
 
void keyTreeDoubleClicked (QTreeWidgetItem *_item, int col)
 doubleclick in the keyTree More...
 
void updateShortcut ()
 check if the shortcut exists and add it if not More...
 
void slotShowPluginOptions (const QString &_pluginName)
 
void restoreKeyPresets ()
 restore keyBinding Presets More...
 
void updateViewerSettings (int _row)
 update the dialog if the selected viewer changes More...
 
void viewerSettingsChanged (QListWidgetItem *_item)
 remember user changes to viewer properties More...
 
void viewerSettingsChanged (int _index)
 
void switchStackedWidget ()
 Switch between the stacked widgets of the stereo settings. More...
 
void slotPreviewStereoSettings (int _tmpParam=0)
 
void slotClearSettings ()
 Clear all OpenFlipper settings. More...
 
void slotClearINI ()
 Clear OpenFlipper INI. More...
 
void slotReloadShaders ()
 Clear the Shader Cache. More...
 
void httpRequestFinished (QNetworkReply *_qnr)
 
void updateDataReadProgress (qint64 _bytesReceived, qint64 _bytesTotal)
 
void showError (QNetworkReply::NetworkError _error)
 error occured while downloading More...
 
void cancelDownload ()
 
void updateComponent ()
 
void slotTranslationIndexChanged (int)
 
void authentication (QNetworkReply *_reply, QAuthenticator *_authenticator)
 authentication More...
 

Private Member Functions

void initPluginOptions ()
 
int getPluginInfo (const QString &pluginName)
 get the pluginInfo object corresponding to the given pluginName More...
 
void initKeyTree ()
 init the TreeWidget containing the keyBindings More...
 
void applyShortcuts ()
 check which of the shortcuts changed and inform the core about the change More...
 
void startDownload (QString _url)
 Starts the download of the given file. More...
 
void compareVersions ()
 Compares the versions from the downloaded Versions file with the current versions. More...
 
bool isNewer (QString _current, QString _latest)
 Compares two version strings and returns if a newer Version is available. More...
 
void updateVersionsTable ()
 Redraws the version table. More...
 

Private Attributes

QVBoxLayout * pluginOptionsLayout
 
std::vector< PluginInfo > & plugins_
 
std::vector< KeyBinding > & coreKeys_
 
InverseKeyMap & keys_
 
bool httpRequestAborted
 
QNetworkAccessManager * networkMan_
 
QNetworkReply * downloadRep_
 
QFile * file
 
QProgressDialog * progressDialog_
 
enum OptionsWidget::DOWNLOAD downloadType
 
std::vector< ACG::SceneGraph::DrawModes::DrawModedefaultDrawModes_
 
std::vector< bool > defaultProjectionMode_
 
std::vector< int > defaultViewingDirections_
 
std::vector< bool > defaultRotationLocks_
 
bool updatingViewerSettings_
 
QColor backgroundColor_
 
QStringList updatedPlugins_
 
QString pluginPath_
 
QString currentUpdateName_
 
bool restartRequired_
 
bool exitOnClose_
 

Detailed Description

Definition at line 64 of file optionsWidget.hh.

Member Enumeration Documentation

◆ DOWNLOAD

enum OptionsWidget::DOWNLOAD
private

Definition at line 171 of file optionsWidget.hh.

Constructor & Destructor Documentation

◆ OptionsWidget()

OptionsWidget::OptionsWidget ( std::vector< PluginInfo > &  _plugins,
std::vector< KeyBinding > &  _core,
InverseKeyMap &  _invKeys,
QWidget *  parent = 0 
)

Definition at line 59 of file optionsWidget.cc.

Member Function Documentation

◆ applyShortcuts()

void OptionsWidget::applyShortcuts ( )
private

check which of the shortcuts changed and inform the core about the change

Definition at line 123 of file keyBindings.cc.

◆ authentication

void OptionsWidget::authentication ( QNetworkReply *  _reply,
QAuthenticator *  _authenticator 
)
privateslot

authentication

Definition at line 104 of file downloader.cc.

◆ cancelDownload

void OptionsWidget::cancelDownload ( )
privateslot

Definition at line 158 of file downloader.cc.

◆ compareVersions()

void OptionsWidget::compareVersions ( )
private

Compares the versions from the downloaded Versions file with the current versions.

Definition at line 946 of file optionsWidget.cc.

◆ getBackgroundColor

void OptionsWidget::getBackgroundColor ( )
privateslot

open a dialog to determine the color

Definition at line 175 of file optionsWidget.cc.

◆ getDefaultColor

void OptionsWidget::getDefaultColor ( )
privateslot

Definition at line 185 of file optionsWidget.cc.

◆ getPluginInfo()

int OptionsWidget::getPluginInfo ( const QString &  pluginName)
private

get the pluginInfo object corresponding to the given pluginName

Definition at line 50 of file keyBindings.cc.

◆ httpRequestFinished

void OptionsWidget::httpRequestFinished ( QNetworkReply *  _qnr)
privateslot

Definition at line 113 of file downloader.cc.

◆ initKeyTree()

void OptionsWidget::initKeyTree ( )
private

init the TreeWidget containing the keyBindings

Definition at line 196 of file keyBindings.cc.

◆ initPluginOptions()

void OptionsWidget::initPluginOptions ( )
private

Definition at line 590 of file optionsWidget.cc.

◆ isNewer()

bool OptionsWidget::isNewer ( QString  _current,
QString  _latest 
)
private

Compares two version strings and returns if a newer Version is available.

Definition at line 914 of file optionsWidget.cc.

◆ keyTreeDoubleClicked

void OptionsWidget::keyTreeDoubleClicked ( QTreeWidgetItem *  _item,
int  col 
)
privateslot

doubleclick in the keyTree

Definition at line 59 of file keyBindings.cc.

◆ keyTreeItemChanged

void OptionsWidget::keyTreeItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  previous 
)
privateslot

keyBinding TreeWidget-Item changed

user selects a different item in the tree

Definition at line 70 of file keyBindings.cc.

◆ restoreKeyPresets

void OptionsWidget::restoreKeyPresets ( )
privateslot

restore keyBinding Presets

Definition at line 159 of file keyBindings.cc.

◆ showError

void OptionsWidget::showError ( QNetworkReply::NetworkError  _error)
privateslot

error occured while downloading

Definition at line 178 of file downloader.cc.

◆ showEvent()

void OptionsWidget::showEvent ( QShowEvent *  event)
protected

Definition at line 270 of file optionsWidget.cc.

◆ slotApply

void OptionsWidget::slotApply ( )
privateslot

Update Options and tell others about changed Options.

Definition at line 631 of file optionsWidget.cc.

◆ slotCancel

void OptionsWidget::slotCancel ( )
privateslot

Only hide widget.

Definition at line 802 of file optionsWidget.cc.

◆ slotCheckUpdates

void OptionsWidget::slotCheckUpdates ( )
privateslot

Checks for updates.

Definition at line 806 of file optionsWidget.cc.

◆ slotClearINI

void OptionsWidget::slotClearINI ( )
privateslot

Clear OpenFlipper INI.

Definition at line 1020 of file optionsWidget.cc.

◆ slotClearSettings

void OptionsWidget::slotClearSettings ( )
privateslot

Clear all OpenFlipper settings.

Definition at line 1015 of file optionsWidget.cc.

◆ slotGetUpdates

void OptionsWidget::slotGetUpdates ( )
privateslot

Download updates.

Definition at line 820 of file optionsWidget.cc.

◆ slotOk

void OptionsWidget::slotOk ( )
privateslot

call slotApply and hide widget

Definition at line 797 of file optionsWidget.cc.

◆ slotPreviewStereoSettings

void OptionsWidget::slotPreviewStereoSettings ( int  _tmpParam = 0)
privateslot

This function is called to update stereo settings for real-time preview Note: The parameter only makes sure that the signals can be connected to this slot.

Definition at line 998 of file optionsWidget.cc.

◆ slotReloadShaders

void OptionsWidget::slotReloadShaders ( )
privateslot

Clear the Shader Cache.

Definition at line 1028 of file optionsWidget.cc.

◆ slotShowPluginOptions

void OptionsWidget::slotShowPluginOptions ( const QString &  _pluginName)
privateslot

Definition at line 609 of file optionsWidget.cc.

◆ slotTranslationIndexChanged

void OptionsWidget::slotTranslationIndexChanged ( int  )
privateslot

Definition at line 236 of file optionsWidget.cc.

◆ startDownload()

void OptionsWidget::startDownload ( QString  _url)
private

Starts the download of the given file.

Definition at line 52 of file downloader.cc.

◆ switchStackedWidget

void OptionsWidget::switchStackedWidget ( )
privateslot

Switch between the stacked widgets of the stereo settings.

Definition at line 221 of file optionsWidget.cc.

◆ updateComponent

void OptionsWidget::updateComponent ( )
privateslot

Definition at line 868 of file optionsWidget.cc.

◆ updateDataReadProgress

void OptionsWidget::updateDataReadProgress ( qint64  _bytesReceived,
qint64  _bytesTotal 
)
privateslot

Definition at line 167 of file downloader.cc.

◆ updateShortcut

void OptionsWidget::updateShortcut ( )
privateslot

check if the shortcut exists and add it if not

Definition at line 86 of file keyBindings.cc.

◆ updateVersionsTable()

void OptionsWidget::updateVersionsTable ( )
private

Redraws the version table.

Definition at line 476 of file optionsWidget.cc.

◆ updateViewerSettings

void OptionsWidget::updateViewerSettings ( int  _row)
privateslot

update the dialog if the selected viewer changes

Definition at line 240 of file optionsWidget.cc.

◆ viewerSettingsChanged [1/2]

void OptionsWidget::viewerSettingsChanged ( int  _index)
privateslot

Definition at line 199 of file optionsWidget.cc.

◆ viewerSettingsChanged [2/2]

void OptionsWidget::viewerSettingsChanged ( QListWidgetItem *  _item)
privateslot

remember user changes to viewer properties

Definition at line 195 of file optionsWidget.cc.

Member Data Documentation

◆ backgroundColor_

QColor OptionsWidget::backgroundColor_
private

Definition at line 187 of file optionsWidget.hh.

◆ coreKeys_

std::vector<KeyBinding>& OptionsWidget::coreKeys_
private

Definition at line 145 of file optionsWidget.hh.

◆ currentUpdateName_

QString OptionsWidget::currentUpdateName_
private

Current filename of the plugin to be updated

Definition at line 236 of file optionsWidget.hh.

◆ defaultDrawModes_

std::vector< ACG::SceneGraph::DrawModes::DrawMode > OptionsWidget::defaultDrawModes_
private

Definition at line 179 of file optionsWidget.hh.

◆ defaultProjectionMode_

std::vector< bool > OptionsWidget::defaultProjectionMode_
private

Definition at line 180 of file optionsWidget.hh.

◆ defaultRotationLocks_

std::vector< bool > OptionsWidget::defaultRotationLocks_
private

Definition at line 182 of file optionsWidget.hh.

◆ defaultViewingDirections_

std::vector< int > OptionsWidget::defaultViewingDirections_
private

Definition at line 181 of file optionsWidget.hh.

◆ downloadRep_

QNetworkReply* OptionsWidget::downloadRep_
private

Definition at line 162 of file optionsWidget.hh.

◆ exitOnClose_

bool OptionsWidget::exitOnClose_
private

Definition at line 241 of file optionsWidget.hh.

◆ file

QFile* OptionsWidget::file
private

Definition at line 165 of file optionsWidget.hh.

◆ httpRequestAborted

bool OptionsWidget::httpRequestAborted
private

Definition at line 156 of file optionsWidget.hh.

◆ keys_

InverseKeyMap& OptionsWidget::keys_
private

Definition at line 147 of file optionsWidget.hh.

◆ networkMan_

QNetworkAccessManager* OptionsWidget::networkMan_
private

Definition at line 160 of file optionsWidget.hh.

◆ pluginOptionsLayout

QVBoxLayout* OptionsWidget::pluginOptionsLayout
private

Definition at line 141 of file optionsWidget.hh.

◆ pluginPath_

QString OptionsWidget::pluginPath_
private

Here the architecture specific path for plugins will be created

Definition at line 232 of file optionsWidget.hh.

◆ plugins_

std::vector<PluginInfo>& OptionsWidget::plugins_
private

Definition at line 144 of file optionsWidget.hh.

◆ progressDialog_

QProgressDialog* OptionsWidget::progressDialog_
private

Definition at line 168 of file optionsWidget.hh.

◆ restartRequired_

bool OptionsWidget::restartRequired_
private

Used to track whether another language has been selected

Definition at line 240 of file optionsWidget.hh.

◆ updatedPlugins_

QStringList OptionsWidget::updatedPlugins_
private

After checking for updates this variable will contain a list of filenames for which updates are available

Definition at line 228 of file optionsWidget.hh.

◆ updatingViewerSettings_

bool OptionsWidget::updatingViewerSettings_
private

Definition at line 184 of file optionsWidget.hh.


The documentation for this class was generated from the following files: