2017-07-19 14:20:32 -07:00
|
|
|
#pragma once
|
2013-08-09 04:57:18 +00:00
|
|
|
|
2020-12-23 18:16:00 -08:00
|
|
|
#include "lc_application.h"
|
|
|
|
#include "lc_shortcuts.h"
|
|
|
|
#include "lc_category.h"
|
2013-08-09 04:57:18 +00:00
|
|
|
|
2020-12-23 18:16:00 -08:00
|
|
|
struct lcPreferencesDialogOptions
|
|
|
|
{
|
|
|
|
lcPreferences Preferences;
|
|
|
|
|
|
|
|
QString LibraryPath;
|
|
|
|
QString ColorConfigPath;
|
|
|
|
QString MinifigSettingsPath;
|
|
|
|
QString POVRayPath;
|
|
|
|
QString LGEOPath;
|
|
|
|
QString DefaultAuthor;
|
|
|
|
QString Language;
|
|
|
|
int CheckForUpdates;
|
|
|
|
|
|
|
|
int AASamples;
|
|
|
|
int StudLogo;
|
|
|
|
|
|
|
|
std::vector<lcLibraryCategory> Categories;
|
|
|
|
bool CategoriesModified;
|
|
|
|
bool CategoriesDefault;
|
|
|
|
|
|
|
|
lcKeyboardShortcuts KeyboardShortcuts;
|
|
|
|
bool KeyboardShortcutsModified;
|
|
|
|
bool KeyboardShortcutsDefault;
|
|
|
|
|
|
|
|
lcMouseShortcuts MouseShortcuts;
|
|
|
|
bool MouseShortcutsModified;
|
|
|
|
bool MouseShortcutsDefault;
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
2013-08-09 04:57:18 +00:00
|
|
|
class lcQPreferencesDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class lcQPreferencesDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2019-09-21 18:47:33 +02:00
|
|
|
|
2013-08-09 04:57:18 +00:00
|
|
|
public:
|
2019-06-20 18:52:33 -07:00
|
|
|
lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogOptions* Options);
|
2013-08-09 04:57:18 +00:00
|
|
|
~lcQPreferencesDialog();
|
|
|
|
|
2019-06-20 18:52:33 -07:00
|
|
|
lcPreferencesDialogOptions* mOptions;
|
2013-08-09 04:57:18 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
CategoryRole = Qt::UserRole
|
|
|
|
};
|
|
|
|
|
2020-03-22 15:44:41 -07:00
|
|
|
bool eventFilter(QObject* Object, QEvent* Event) override;
|
2013-08-09 04:57:18 +00:00
|
|
|
|
|
|
|
public slots:
|
2020-03-22 15:44:41 -07:00
|
|
|
void accept() override;
|
2013-08-09 04:57:18 +00:00
|
|
|
void on_partsLibraryBrowse_clicked();
|
2019-03-06 19:54:17 +01:00
|
|
|
void on_partsArchiveBrowse_clicked();
|
2019-06-20 18:52:33 -07:00
|
|
|
void on_ColorConfigBrowseButton_clicked();
|
|
|
|
void on_MinifigSettingsBrowseButton_clicked();
|
2013-08-17 21:54:07 +00:00
|
|
|
void on_povrayExecutableBrowse_clicked();
|
|
|
|
void on_lgeoPathBrowse_clicked();
|
2020-08-15 15:23:44 -07:00
|
|
|
void on_ColorTheme_currentIndexChanged(int Index);
|
2019-01-20 11:59:18 -08:00
|
|
|
void ColorButtonClicked();
|
2013-08-09 04:57:18 +00:00
|
|
|
void on_antiAliasing_toggled();
|
|
|
|
void on_edgeLines_toggled();
|
2020-06-06 11:16:01 -07:00
|
|
|
void on_LineWidthSlider_valueChanged();
|
2020-08-15 16:16:26 -07:00
|
|
|
void on_MeshLODSlider_valueChanged();
|
2020-04-25 12:16:37 -07:00
|
|
|
void on_FadeSteps_toggled();
|
2020-04-25 11:36:28 -07:00
|
|
|
void on_HighlightNewParts_toggled();
|
2013-08-31 21:58:47 +00:00
|
|
|
void on_gridStuds_toggled();
|
|
|
|
void on_gridLines_toggled();
|
2019-01-20 11:59:18 -08:00
|
|
|
void on_ViewSphereSizeCombo_currentIndexChanged(int Index);
|
2020-12-30 10:39:04 -08:00
|
|
|
void on_PreviewViewSphereSizeCombo_currentIndexChanged(int Index);
|
2013-08-09 04:57:18 +00:00
|
|
|
void updateParts();
|
|
|
|
void on_newCategory_clicked();
|
|
|
|
void on_editCategory_clicked();
|
|
|
|
void on_deleteCategory_clicked();
|
|
|
|
void on_importCategories_clicked();
|
|
|
|
void on_exportCategories_clicked();
|
|
|
|
void on_resetCategories_clicked();
|
|
|
|
void on_shortcutAssign_clicked();
|
|
|
|
void on_shortcutRemove_clicked();
|
|
|
|
void on_shortcutsImport_clicked();
|
|
|
|
void on_shortcutsExport_clicked();
|
|
|
|
void on_shortcutsReset_clicked();
|
|
|
|
void commandChanged(QTreeWidgetItem *current);
|
2019-05-11 16:46:37 -07:00
|
|
|
void on_KeyboardFilterEdit_textEdited(const QString& Text);
|
2016-04-25 05:26:34 +00:00
|
|
|
void on_mouseAssign_clicked();
|
|
|
|
void on_mouseRemove_clicked();
|
2020-08-22 18:47:03 -07:00
|
|
|
void on_MouseImportButton_clicked();
|
|
|
|
void on_MouseExportButton_clicked();
|
2016-04-25 05:26:34 +00:00
|
|
|
void on_mouseReset_clicked();
|
2019-09-21 18:47:33 +02:00
|
|
|
void on_studLogo_toggled();
|
2016-04-25 05:26:34 +00:00
|
|
|
void MouseTreeItemChanged(QTreeWidgetItem* Current);
|
2013-08-09 04:57:18 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::lcQPreferencesDialog *ui;
|
|
|
|
|
|
|
|
void updateCategories();
|
|
|
|
void updateCommandList();
|
2016-04-25 05:26:34 +00:00
|
|
|
void UpdateMouseTree();
|
|
|
|
void UpdateMouseTreeItem(int ItemIndex);
|
2013-08-09 04:57:18 +00:00
|
|
|
void setShortcutModified(QTreeWidgetItem *treeItem, bool modified);
|
|
|
|
|
2020-06-06 11:16:01 -07:00
|
|
|
float mLineWidthRange[2];
|
|
|
|
float mLineWidthGranularity;
|
2020-08-15 16:16:26 -07:00
|
|
|
static constexpr float mMeshLODMultiplier = 25.0f;
|
2020-06-06 11:16:01 -07:00
|
|
|
};
|