53 #ifndef OPTIONSWIDGET_HH
54 #define OPTIONSWIDGET_HH
56 #include <OpenFlipper/Core/PluginInfo.hh>
57 #include <ACG/Scenegraph/DrawModes.hh>
59 #include "ui_optionsWidget.hh"
61 #if QT_VERSION >= 0x050000
67 #include <QStringList>
68 #include <QProgressDialog>
73 typedef std::multimap< std::pair< QObject*, int >, std::pair< int, Qt::KeyboardModifiers > > InverseKeyMap;
82 OptionsWidget(std::vector<PluginInfo>& _plugins, std::vector<KeyBinding>& _core, InverseKeyMap& _invKeys, QWidget* parent =0 );
88 void addKeyMapping(
int _key, Qt::KeyboardModifiers _modifiers, QObject* _plugin,
int _keyBindingID);
107 void getDefaultColor();
116 void slotShowPluginOptions(
const QString& _pluginName );
146 void showEvent ( QShowEvent * event );
151 void initPluginOptions();
153 QVBoxLayout* pluginOptionsLayout;
156 std::vector<PluginInfo>& plugins_;
157 std::vector<KeyBinding>& coreKeys_;
159 InverseKeyMap& keys_;
168 bool httpRequestAborted;
172 QNetworkAccessManager *networkMan_;
174 QNetworkReply* downloadRep_;
180 QProgressDialog *progressDialog_;
191 std::vector< ACG::SceneGraph::DrawModes::DrawMode > defaultDrawModes_;
192 std::vector< bool > defaultProjectionMode_;
193 std::vector< int > defaultViewingDirections_;
194 std::vector< bool > defaultRotationLocks_;
196 bool updatingViewerSettings_;
199 QColor backgroundColor_;
209 bool isNewer(QString _current, QString _latest);
217 void httpRequestFinished(QNetworkReply *_qnr);
220 void updateDataReadProgress(qint64 _bytesReceived, qint64 _bytesTotal);
223 void showError(QNetworkReply::NetworkError _error);
226 void cancelDownload();
229 void updateComponent();
232 void slotTranslationIndexChanged(
int);
235 void authentication ( QNetworkReply* _reply, QAuthenticator* _authenticator );
258 #endif //OPTIONSWIDGET_HH
void viewerSettingsChanged(QListWidgetItem *_item)
remember user changes to viewer properties
void startDownload(QString _url)
Starts the download of the given file.
void showError(QNetworkReply::NetworkError _error)
error occured while downloading
void slotGetUpdates()
Download updates.
void slotApply()
Update Options and tell others about changed Options.
void switchStackedWidget()
Switch between the stacked widgets of the stereo settings.
void updateVersionsTable()
Redraws the version table.
bool isNewer(QString _current, QString _latest)
Compares two version strings and returns if a newer Version is available.
void updateViewerSettings(int _row)
update the dialog if the selected viewer changes
void updateShortcut()
check if the shortcut exists and add it if not
void getBackgroundColor()
open a dialog to determine the color
QString currentUpdateName_
void applyShortcuts()
check which of the shortcuts changed and inform the core about the change
void restoreKeyPresets()
restore keyBinding Presets
void keyTreeDoubleClicked(QTreeWidgetItem *_item, int col)
doubleclick in the keyTree
void slotClearINI()
Clear OpenFlipper INI.
void authentication(QNetworkReply *_reply, QAuthenticator *_authenticator)
authentication
void initKeyTree()
init the TreeWidget containing the keyBindings
void slotClearSettings()
Clear all OpenFlipper settings.
void compareVersions()
Compares the versions from the downloaded Versions file with the current versions.
void slotCheckUpdates()
Checks for updates.
QStringList updatedPlugins_
void slotPreviewStereoSettings(int _tmpParam=0)
int getPluginInfo(QString pluginName)
get the pluginInfo object corresponding to the given pluginName
void keyTreeItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
keyBinding TreeWidget-Item changed
void slotOk()
call slotApply and hide widget
void slotReloadShaders()
Clear the Shader Cache.
void slotCancel()
Only hide widget.