2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
enum LC_PROFILE_KEY
|
|
|
|
{
|
|
|
|
// Settings.
|
2014-10-05 07:21:51 +02:00
|
|
|
LC_PROFILE_FIXED_AXES,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_LINE_WIDTH,
|
2019-11-28 21:47:19 +01:00
|
|
|
LC_PROFILE_ALLOW_LOD,
|
2020-08-16 01:16:26 +02:00
|
|
|
LC_PROFILE_LOD_DISTANCE,
|
2020-01-02 02:06:17 +01:00
|
|
|
LC_PROFILE_FADE_STEPS,
|
2020-04-25 21:16:37 +02:00
|
|
|
LC_PROFILE_FADE_STEPS_COLOR,
|
2020-04-25 20:36:28 +02:00
|
|
|
LC_PROFILE_HIGHLIGHT_NEW_PARTS,
|
|
|
|
LC_PROFILE_HIGHLIGHT_NEW_PARTS_COLOR,
|
2017-08-25 21:57:14 +02:00
|
|
|
LC_PROFILE_SHADING_MODE,
|
2020-11-26 20:51:50 +01:00
|
|
|
LC_PROFILE_BACKGROUND_GRADIENT,
|
|
|
|
LC_PROFILE_BACKGROUND_COLOR,
|
|
|
|
LC_PROFILE_GRADIENT_COLOR_TOP,
|
|
|
|
LC_PROFILE_GRADIENT_COLOR_BOTTOM,
|
2014-02-10 01:13:41 +01:00
|
|
|
LC_PROFILE_DRAW_AXES,
|
2020-07-11 19:47:52 +02:00
|
|
|
LC_PROFILE_AXES_COLOR,
|
2020-12-30 22:44:08 +01:00
|
|
|
LC_PROFILE_TEXT_COLOR,
|
2021-01-01 00:54:28 +01:00
|
|
|
LC_PROFILE_MARQUEE_BORDER_COLOR,
|
|
|
|
LC_PROFILE_MARQUEE_FILL_COLOR,
|
2020-07-11 19:47:52 +02:00
|
|
|
LC_PROFILE_OVERLAY_COLOR,
|
2020-07-25 22:21:22 +02:00
|
|
|
LC_PROFILE_ACTIVE_VIEW_COLOR,
|
2020-12-12 03:01:04 +01:00
|
|
|
LC_PROFILE_INACTIVE_VIEW_COLOR,
|
2014-02-10 01:13:41 +01:00
|
|
|
LC_PROFILE_DRAW_EDGE_LINES,
|
2013-08-31 23:58:47 +02:00
|
|
|
LC_PROFILE_GRID_STUDS,
|
|
|
|
LC_PROFILE_GRID_STUD_COLOR,
|
|
|
|
LC_PROFILE_GRID_LINES,
|
|
|
|
LC_PROFILE_GRID_LINE_SPACING,
|
|
|
|
LC_PROFILE_GRID_LINE_COLOR,
|
2021-01-12 03:49:57 +01:00
|
|
|
LC_PROFILE_GRID_ORIGIN,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_ANTIALIASING_SAMPLES,
|
2020-01-05 20:38:24 +01:00
|
|
|
LC_PROFILE_VIEW_SPHERE_ENABLED,
|
2018-10-29 01:59:01 +01:00
|
|
|
LC_PROFILE_VIEW_SPHERE_LOCATION,
|
|
|
|
LC_PROFILE_VIEW_SPHERE_SIZE,
|
2019-01-20 20:59:18 +01:00
|
|
|
LC_PROFILE_VIEW_SPHERE_COLOR,
|
|
|
|
LC_PROFILE_VIEW_SPHERE_TEXT_COLOR,
|
|
|
|
LC_PROFILE_VIEW_SPHERE_HIGHLIGHT_COLOR,
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2019-11-28 22:52:06 +01:00
|
|
|
LC_PROFILE_LANGUAGE,
|
2020-07-25 22:21:22 +02:00
|
|
|
LC_PROFILE_COLOR_THEME,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_CHECK_UPDATES,
|
|
|
|
LC_PROFILE_PROJECTS_PATH,
|
|
|
|
LC_PROFILE_PARTS_LIBRARY,
|
2019-12-09 04:19:02 +01:00
|
|
|
LC_PROFILE_PART_PALETTES,
|
2019-06-21 03:52:33 +02:00
|
|
|
LC_PROFILE_MINIFIG_SETTINGS,
|
|
|
|
LC_PROFILE_COLOR_CONFIG,
|
2016-04-23 02:17:33 +02:00
|
|
|
LC_PROFILE_KEYBOARD_SHORTCUTS,
|
|
|
|
LC_PROFILE_MOUSE_SHORTCUTS,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_CATEGORIES,
|
|
|
|
LC_PROFILE_RECENT_FILE1,
|
|
|
|
LC_PROFILE_RECENT_FILE2,
|
|
|
|
LC_PROFILE_RECENT_FILE3,
|
|
|
|
LC_PROFILE_RECENT_FILE4,
|
2019-03-07 17:26:50 +01:00
|
|
|
LC_PROFILE_AUTOLOAD_MOSTRECENT,
|
2020-01-02 02:06:17 +01:00
|
|
|
LC_PROFILE_RESTORE_TAB_LAYOUT,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_AUTOSAVE_INTERVAL,
|
|
|
|
LC_PROFILE_MOUSE_SENSITIVITY,
|
|
|
|
LC_PROFILE_IMAGE_WIDTH,
|
|
|
|
LC_PROFILE_IMAGE_HEIGHT,
|
2014-10-12 01:26:23 +02:00
|
|
|
LC_PROFILE_IMAGE_EXTENSION,
|
2016-12-20 23:46:12 +01:00
|
|
|
LC_PROFILE_PARTS_LIST_ICONS,
|
2017-01-28 03:20:44 +01:00
|
|
|
LC_PROFILE_PARTS_LIST_NAMES,
|
2017-02-04 22:14:41 +01:00
|
|
|
LC_PROFILE_PARTS_LIST_COLOR,
|
|
|
|
LC_PROFILE_PARTS_LIST_DECORATED,
|
2019-08-04 20:00:41 +02:00
|
|
|
LC_PROFILE_PARTS_LIST_ALIASES,
|
2017-05-29 23:03:46 +02:00
|
|
|
LC_PROFILE_PARTS_LIST_LISTMODE,
|
2021-01-20 13:19:29 +01:00
|
|
|
LC_PROFILE_STUD_STYLE,
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
// Defaults for new projects.
|
|
|
|
LC_PROFILE_DEFAULT_AUTHOR_NAME,
|
|
|
|
LC_PROFILE_DEFAULT_AMBIENT_COLOR,
|
|
|
|
|
|
|
|
// Exporters.
|
|
|
|
LC_PROFILE_HTML_OPTIONS,
|
|
|
|
LC_PROFILE_HTML_IMAGE_OPTIONS,
|
|
|
|
LC_PROFILE_HTML_IMAGE_WIDTH,
|
|
|
|
LC_PROFILE_HTML_IMAGE_HEIGHT,
|
|
|
|
LC_PROFILE_POVRAY_PATH,
|
|
|
|
LC_PROFILE_POVRAY_LGEO_PATH,
|
2017-11-04 00:01:30 +01:00
|
|
|
LC_PROFILE_POVRAY_WIDTH,
|
|
|
|
LC_PROFILE_POVRAY_HEIGHT,
|
2013-08-09 06:57:18 +02:00
|
|
|
|
2020-10-03 12:02:27 +02:00
|
|
|
LC_PROFILE_PREVIEW_VIEW_SPHERE_ENABLED,
|
|
|
|
LC_PROFILE_PREVIEW_VIEW_SPHERE_SIZE,
|
|
|
|
LC_PROFILE_PREVIEW_VIEW_SPHERE_LOCATION,
|
|
|
|
LC_PROFILE_PREVIEW_DRAW_AXES,
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_NUM_PROFILE_KEYS
|
|
|
|
};
|
|
|
|
|
|
|
|
enum LC_PROFILE_ENTRY_TYPE
|
|
|
|
{
|
|
|
|
LC_PROFILE_ENTRY_INT,
|
|
|
|
LC_PROFILE_ENTRY_FLOAT,
|
|
|
|
LC_PROFILE_ENTRY_STRING,
|
2016-04-30 21:40:46 +02:00
|
|
|
LC_PROFILE_ENTRY_STRINGLIST,
|
2013-08-09 06:57:18 +02:00
|
|
|
LC_PROFILE_ENTRY_BUFFER
|
|
|
|
};
|
|
|
|
|
|
|
|
class lcProfileEntry
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
lcProfileEntry(const char* Section, const char* Key, int DefaultValue);
|
|
|
|
lcProfileEntry(const char* Section, const char* Key, unsigned int DefaultValue);
|
|
|
|
lcProfileEntry(const char* Section, const char* Key, float DefaultValue);
|
|
|
|
lcProfileEntry(const char* Section, const char* Key, const char* DefaultValue);
|
2016-04-30 21:40:46 +02:00
|
|
|
lcProfileEntry(const char* Section, const char* Key, const QStringList& StringList);
|
2013-08-09 06:57:18 +02:00
|
|
|
lcProfileEntry(const char* Section, const char* Key);
|
|
|
|
|
|
|
|
LC_PROFILE_ENTRY_TYPE mType;
|
|
|
|
|
|
|
|
const char* mSection;
|
|
|
|
const char* mKey;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
int IntValue;
|
|
|
|
float FloatValue;
|
|
|
|
const char* StringValue;
|
|
|
|
} mDefault;
|
|
|
|
};
|
|
|
|
|
|
|
|
void lcRemoveProfileKey(LC_PROFILE_KEY Key);
|
|
|
|
|
2015-03-21 21:12:04 +01:00
|
|
|
int lcGetDefaultProfileInt(LC_PROFILE_KEY Key);
|
|
|
|
float lcGetDefaultProfileFloat(LC_PROFILE_KEY Key);
|
|
|
|
QString lcGetDefaultProfileString(LC_PROFILE_KEY Key);
|
|
|
|
|
2013-08-09 06:57:18 +02:00
|
|
|
int lcGetProfileInt(LC_PROFILE_KEY Key);
|
|
|
|
float lcGetProfileFloat(LC_PROFILE_KEY Key);
|
2015-01-31 22:44:57 +01:00
|
|
|
QString lcGetProfileString(LC_PROFILE_KEY Key);
|
2016-04-30 21:40:46 +02:00
|
|
|
QStringList lcGetProfileStringList(LC_PROFILE_KEY Key);
|
2015-09-27 09:02:57 +02:00
|
|
|
QByteArray lcGetProfileBuffer(LC_PROFILE_KEY Key);
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
void lcSetProfileInt(LC_PROFILE_KEY Key, int Value);
|
|
|
|
void lcSetProfileFloat(LC_PROFILE_KEY Key, float Value);
|
2014-09-08 21:42:20 +02:00
|
|
|
void lcSetProfileString(LC_PROFILE_KEY Key, const QString& Value);
|
2016-04-30 21:40:46 +02:00
|
|
|
void lcSetProfileStringList(LC_PROFILE_KEY Key, const QStringList& Value);
|
2015-09-27 09:02:57 +02:00
|
|
|
void lcSetProfileBuffer(LC_PROFILE_KEY Key, const QByteArray& Buffer);
|