Skip to content

Commit

Permalink
renames abriviated component names
Browse files Browse the repository at this point in the history
  • Loading branch information
GeraldKimmersdorfer committed Nov 30, 2023
1 parent d247115 commit 45f331d
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 88 deletions.
13 changes: 6 additions & 7 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,21 @@ qt_add_qml_module(alpineapp
StatsWindow.qml
GeneralSettings.qml
GlSettings.qml
FABGroup.qml
components/ValSlider.qml
components/ValRangeSlider.qml
FloatingActionButtonGroup.qml
components/LabledSlider.qml
components/LabledRangeSlider.qml
components/ColorPicker.qml
components/PageDrawer.qml
components/CheckGroup.qml
components/SetPanel.qml
components/SetTitle.qml
components/SettingsPanel.qml
components/SettingsTitle.qml
components/DrawerButton.qml
components/DrawerSeparator.qml
components/DrawerSpacer.qml
components/VectorEditor.qml
components/DatePicker.qml
components/DateMonthTablePicker.qml
components/RoundMapButton.qml
components/FAButton.qml
components/FloatingActionButton.qml
RESOURCES
icons/mascot.jpg
icons/menu.svg
Expand Down
13 changes: 7 additions & 6 deletions app/FABGroup.qml → app/FloatingActionButtonGroup.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*****************************************************************************
* Alpine Terrain Renderer
* Copyright (C) 2023 Adam Celarek
* Copyright (C) 2023 Gerald Kimmersdorfer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -57,21 +58,21 @@ ColumnLayout {
}
}

FAButton {
FloatingActionButton {
rotation: map.camera_rotation_from_north
image: "../icons/material/navigation_offset.svg"
onClicked: map.rotate_north()
size: parent.width
}

FAButton {
FloatingActionButton {
id: fab_location
image: checked ? "../icons/material/my_location.svg" : "../icons/material/location_searching.svg"
checkable: true
size: parent.width
}

FAButton {
FloatingActionButton {
id: fab_presets
image: checked ? "../icons/material/chevron_left.svg" : "../icons/material/format_paint.svg"
size: parent.width
Expand All @@ -92,7 +93,7 @@ ColumnLayout {
spacing: 0
height: parent.height

FAButton {
FloatingActionButton {
image: "../icons/presets/basic.png"
onClicked: map.set_gl_preset("AAABIHjaY2BgYLL_wAAGGPRhY2EHEP303YEDIPrZPr0FQHr_EU-HBAYEwKn_5syZIPX2DxgEGLDQcP0_ILQDBwMKcHBgwAoc7KC0CJTuhyh0yGRAoeHueIBK4wAKQMwIxXAAAFQuIIw")
size: parent.height
Expand All @@ -103,7 +104,7 @@ ColumnLayout {
ToolTip.text: qsTr("BASIC-Preset: Fast with no shading")
}

FAButton {
FloatingActionButton {
image: "../icons/presets/shaded.png"
onClicked: map.set_gl_preset("AAABIHjaY2BgYLL_wAAGGPRhY2EHEP1s0rwEMG32D0TvPxS4yIEBAXDqvzlz5gIQ_YBBgAELDdf_A0I7cDCgAAcHBqzAwQ5Ki0DpfohCh0wGFBrujgeoNBAwQjEyXwFNHEwDAMaIIAM")
size: parent.height
Expand All @@ -114,7 +115,7 @@ ColumnLayout {
ToolTip.text: qsTr("SHADED-Preset: Shading + SSAO + CSM")
}

FAButton {
FloatingActionButton {
image: "../icons/presets/snow.png"
onClicked: map.set_gl_preset("AAABIHjaY2BgYLL_wAAGGPRhY2EHEP1s0rwEMG32D0TvPxS4yIEBAXDqvzlz5gIQ_YBBgAELDdf_A0I7cDCgAAcHVPPg4nZQWgRK90MUOmQyoNBwdzxApYGAEYqR-Qpo4mAaAFhrITI")
size: parent.height
Expand Down
12 changes: 6 additions & 6 deletions app/GeneralSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Alpine

import "components"

SetPanel {
SettingsPanel {
Component.onCompleted: {
// when creating the this component, values are read from the renderer
// after that we establish a binding, so this component can set values on the renderer
Expand Down Expand Up @@ -71,7 +71,7 @@ SetPanel {
}

Label { text: qsTr("Time:") }
ValSlider {
LabledSlider {
property int hours;
property int minutes;
id: currentTime;
Expand Down Expand Up @@ -110,19 +110,19 @@ SetPanel {
CheckGroup {
name: qsTr("Camera")
Label { text: qsTr("Field of view:") }
ValSlider {
LabledSlider {
id: fov_slider;
from: 15; to: 120; stepSize: 1;
}

Label { text: qsTr("Frame limiter:") }
ValSlider {
LabledSlider {
id: frame_rate_slider;
from: 2; to: 120; stepSize: 1;
}

Label { text: qsTr("Level of detail:") }
ValSlider {
LabledSlider {
id: lod_slider;
from: 0.1; to: 2.0; stepSize: 0.1;
}
Expand All @@ -132,7 +132,7 @@ SetPanel {
name: qsTr("Cache & Network")

Label { text: qsTr("Cache size:") }
ValSlider {
LabledSlider {
id: cache_size_slider;
from: 1000; to: 20000; stepSize: 1000;
}
Expand Down
22 changes: 11 additions & 11 deletions app/GlSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Alpine

import "components"

SetPanel {
SettingsPanel {

function update_control_values() {
let conf = map.shared_config;
Expand Down Expand Up @@ -110,7 +110,7 @@ SetPanel {
text: "Strength:"
visible: overlay_strength.visible;
}
ValSlider {
LabledSlider {
id: overlay_strength;
from: 0.0; to: 1.0; stepSize: 0.01;
visible: overlay_mode.currentValue > 0
Expand Down Expand Up @@ -150,43 +150,43 @@ SetPanel {
onCheckedChanged: map.shared_config.snow_settings_angle.x = this.checked;

Label { text: "Angle:" }
ValRangeSlider {
LabledRangeSlider {
id: snow_settings_angle;
from: 0.0; to: 90.0; stepSize: 0.1;
first.onMoved: map.shared_config.snow_settings_angle.y = this.first.value;
second.onMoved: map.shared_config.snow_settings_angle.z = this.second.value;
}

Label { text: "Angle Blend:" }
ValSlider {
LabledSlider {
id: snow_settings_angle_blend;
from: 0.0; to: 90.0; stepSize: 0.01;
onMoved: map.shared_config.snow_settings_angle.w = this.value;
}

Label { text: "Snow-Line:" }
ValSlider {
LabledSlider {
id: snow_settings_alt_min;
from: 0.0; to: 4000.0; stepSize: 1.0;
onMoved: map.shared_config.snow_settings_alt.x = this.value;
}

Label { text: "Snow-Line Variation:" }
ValSlider {
LabledSlider {
id: snow_settings_alt_var;
from: 0.0; to: 1000.0; stepSize: 1.0;
onMoved: map.shared_config.snow_settings_alt.y = this.value;
}

Label { text: "Snow-Line Blend:" }
ValSlider {
LabledSlider {
id: snow_settings_alt_blend;
from: 0.0; to: 1000.0; stepSize: 1.0;
onMoved: map.shared_config.snow_settings_alt.z = this.value;
}

Label { text: "Snow Specular:" }
ValSlider {
LabledSlider {
id: snow_settings_specular;
from: 0.0; to: 5.0; stepSize: 0.1;
onMoved: map.shared_config.snow_settings_alt.w = this.value;
Expand Down Expand Up @@ -251,21 +251,21 @@ SetPanel {
onCheckedChanged: map.shared_config.ssao_enabled = this.checked;

Label { text: "Kernel-Size:" }
ValSlider {
LabledSlider {
id: ssao_kernel;
from: 5; to: 64; stepSize: 1;
onMoved: map.shared_config.ssao_kernel = value;
}

Label { text: "Falloff-To:" }
ValSlider {
LabledSlider {
id: ssao_falloff_to_value;
from: 0.0; to: 1.0; stepSize: 0.01;
onMoved: map.shared_config.ssao_falloff_to_value = value;
}

Label { text: "Blur-Size:" }
ValSlider {
LabledSlider {
id: ssao_blur_kernel_size;
from: 0; to: 2; stepSize: 1; snapMode: Slider.SnapAlways;
onMoved: map.shared_config.ssao_blur_kernel_size = value;
Expand Down
7 changes: 1 addition & 6 deletions app/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ Item {
onClicked: map.hud_visible = false;
}


DrawerSpacer {}

DrawerSeparator {}
Expand Down Expand Up @@ -230,16 +229,12 @@ Item {
}
}


//DebugWindow {}

StatsWindow {
id: stats_window
visible: false
}


FABGroup {
FloatingActionButtonGroup {
id: fab_group
}

Expand Down
4 changes: 2 additions & 2 deletions app/StatsWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,15 @@ Rectangle {
}
}

SetPanel {
SettingsPanel {
id: main_content
maxHeight: statsMenu.maxHeight // needs to be set directly because parents height is dependent
anchors {
left: parent.left
right: parent.right
}

SetTitle { title: "Statistics" }
SettingsTitle { title: "Statistics" }

CheckGroup {
name: "Frame Profiler"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 0 additions & 46 deletions app/components/RoundMapButton.qml

This file was deleted.

File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions app/components/VectorEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Item {
}

Text { text: elementNames[0] + ": " }
ValSlider {
LabledSlider {
id: edit1
from: elementFroms[0]; to: elementTos[0];
onMoved: {
Expand All @@ -93,7 +93,7 @@ Item {
}

Text { text: elementNames[1] + ": "; visible: vectorSize > 1}
ValSlider {
LabledSlider {
id: edit2
from: vectorSize > 1 ? elementFroms[1] : 0
to: vectorSize > 1 ? elementTos[1] : 1
Expand All @@ -105,7 +105,7 @@ Item {
}

Text { text: elementNames[2] + ": "; visible: vectorSize > 2 }
ValSlider {
LabledSlider {
id: edit3
from: vectorSize > 2 ? elementFroms[2] : 0
to: vectorSize > 2 ? elementTos[2] : 1
Expand All @@ -117,7 +117,7 @@ Item {
}

Text { text: elementNames[3] + ": "; visible: vectorSize > 3 }
ValSlider {
LabledSlider {
id: edit4
from: vectorSize > 3 ? elementFroms[3] : 0
to: vectorSize > 3 ? elementTos[3] : 1
Expand Down

0 comments on commit 45f331d

Please sign in to comment.