Исправления. В ЭМС.gd исправлено выравнивание колонок в таблицах изменения параметров входов и выходов.

This commit is contained in:
MaD_CaT
2023-09-25 11:40:29 +03:00
parent 31444f6d0f
commit dce86705a8
4 changed files with 71 additions and 70 deletions

View File

@@ -165,7 +165,7 @@ func on_row_pressed_in(i_row: int):
## Выбор входного устройства, для отображения в таблице соединений входа и изменения параметров
func set_in_dev(dev):
var row_type: Array = [CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit, CellState]
set_dev($scrl_in_set/tbl_in_set, dev, row_type, IN_SET_ROW, 'Список соединённых выходов :')
set_dev($scrl_in_set/tbl_in_set, dev, row_type, IN_SET_ROW, 'Список соединённых выходов :', [250, 100, 70, 70, 70])
## Обработчик выбора строки в таблице соединений входа и изменения параметров
@@ -264,7 +264,7 @@ func on_row_pressed_out(i_row: int):
## Выбор выходного устройства, для отображения в таблице соединений выхода и изменения параметров
func set_out_dev(dev):
var row_type: Array = [CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit, CellState, CellOptBtn]
set_dev($scrl_out_set/tbl_out_set, dev, row_type, OUT_SET_ROW, 'Список соединённых входов :')
set_dev($scrl_out_set/tbl_out_set, dev, row_type, OUT_SET_ROW, 'Список соединённых входов :', [250, 100, 70, 70, 70, 100])
var mode = $scrl_out_set/tbl_out_set.get_node2(5, 0)
for opt in OUT_MODE:
mode.add_item(opt)
@@ -276,9 +276,10 @@ func set_out_dev(dev):
## Выбор входного или выходного устройства [param tbl] - таблица, [param dev] - устройство,
## [param row_type] - массив с типами колонок, [param row_type_conn] - массив с пустыми LineEdit
## [param lbl_text] - текст отображаемый во 2 строке: пример: ('Список соединённых входов :')
func set_dev(tbl, dev, row_type, row_type_conn, lbl_text):
func set_dev(tbl, dev, row_type, row_type_conn, lbl_text, row_size):
tbl.clear_rows()
tbl.add_row(row_type)
tbl.set_columns_min_size(row_size)
var le_name: LineEdit = tbl.get_node2(0, 0)
le_name.editable = false
le_name.text = dev.dev_name

View File

@@ -1,18 +1,18 @@
[gd_scene load_steps=9 format=3 uid="uid://dab6loryocc73"]
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_yxwqu"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="2_613yt"]
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_y7t8c"]
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_isl7c"]
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_43oc1"]
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_yao2u"]
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_kiwau"]
[ext_resource type="Script" path="res://table/table.gd" id="8_p4lbb"]
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_xmvfg"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="2_b84yd"]
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_ay4t7"]
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_3g22x"]
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_yebut"]
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_5ufey"]
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_rmdgx"]
[ext_resource type="Script" path="res://table/table.gd" id="8_l44lh"]
[node name="ЭМС" type="Panel"]
offset_right = 1598.0
offset_bottom = 1201.0
script = ExtResource("1_yxwqu")
script = ExtResource("1_xmvfg")
[node name="lbl_online" type="Label" parent="."]
layout_mode = 0
@@ -23,7 +23,7 @@ offset_bottom = 30.0
theme_override_colors/font_color = Color(0, 0.647059, 0.184314, 1)
text = "Ячейка на связи"
[node name="btn_flash_read" parent="." instance=ExtResource("2_613yt")]
[node name="btn_flash_read" parent="." instance=ExtResource("2_b84yd")]
layout_mode = 0
offset_left = 1446.0
offset_top = 55.0
@@ -31,7 +31,7 @@ offset_right = 1583.0
offset_bottom = 85.0
text = "Прочитать"
[node name="btn_flash_write" parent="." instance=ExtResource("2_613yt")]
[node name="btn_flash_write" parent="." instance=ExtResource("2_b84yd")]
layout_mode = 0
offset_left = 1446.0
offset_top = 99.0
@@ -48,7 +48,7 @@ offset_bottom = 1016.0
focus_mode = 0
shortcut_feedback = false
shortcut_in_tooltip = false
icon = ExtResource("3_y7t8c")
icon = ExtResource("3_ay4t7")
[node name="btn_save" type="Button" parent="."]
layout_mode = 0
@@ -57,7 +57,7 @@ offset_top = 1017.0
offset_right = 1509.0
offset_bottom = 1073.0
focus_mode = 0
icon = ExtResource("4_isl7c")
icon = ExtResource("4_3g22x")
[node name="btn_copy" type="Button" parent="."]
layout_mode = 0
@@ -66,7 +66,7 @@ offset_top = 1074.0
offset_right = 1510.0
offset_bottom = 1130.0
focus_mode = 0
icon = ExtResource("5_43oc1")
icon = ExtResource("5_yebut")
[node name="btn_connect" type="Button" parent="."]
layout_mode = 0
@@ -76,7 +76,7 @@ offset_right = 683.0
offset_bottom = 111.0
focus_mode = 0
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
icon = ExtResource("6_yao2u")
icon = ExtResource("6_5ufey")
[node name="btn_disconnect" type="Button" parent="."]
layout_mode = 0
@@ -86,7 +86,7 @@ offset_right = 770.0
offset_bottom = 815.0
focus_mode = 0
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
icon = ExtResource("7_kiwau")
icon = ExtResource("7_rmdgx")
[node name="scrollin" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -97,7 +97,7 @@ offset_bottom = 679.0
[node name="tbl_in" type="GridContainer" parent="scrollin"]
layout_mode = 2
script = ExtResource("8_p4lbb")
script = ExtResource("8_l44lh")
[node name="scrl_files" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -108,7 +108,7 @@ offset_bottom = 1166.0
[node name="tbl_files" type="GridContainer" parent="scrl_files"]
layout_mode = 2
script = ExtResource("8_p4lbb")
script = ExtResource("8_l44lh")
[node name="scrollout" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -119,7 +119,7 @@ offset_bottom = 679.0
[node name="tbl_out" type="GridContainer" parent="scrollout"]
layout_mode = 2
script = ExtResource("8_p4lbb")
script = ExtResource("8_l44lh")
[node name="scrl_in_set" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -130,7 +130,7 @@ offset_bottom = 942.0
[node name="tbl_in_set" type="GridContainer" parent="scrl_in_set"]
layout_mode = 2
script = ExtResource("8_p4lbb")
script = ExtResource("8_l44lh")
[node name="scrl_out_set" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -141,4 +141,4 @@ offset_bottom = 924.0
[node name="tbl_out_set" type="GridContainer" parent="scrl_out_set"]
layout_mode = 2
script = ExtResource("8_p4lbb")
script = ExtResource("8_l44lh")

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://trt0q8th3bn2"]
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_4bknr"]
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_4e6at"]
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_6smth"]
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_8wh56"]
[node name="журнал" type="Control"]
layout_mode = 3
@@ -14,7 +14,7 @@ offset_right = -2.0
offset_bottom = -1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_4bknr")
script = ExtResource("1_6smth")
[node name="content" type="RichTextLabel" parent="."]
layout_mode = 0
@@ -27,7 +27,7 @@ theme_override_colors/selection_color = Color(0.72549, 0.270588, 0.133333, 1)
threaded = true
selection_enabled = true
deselect_on_focus_loss_enabled = false
script = ExtResource("2_4e6at")
script = ExtResource("2_8wh56")
[node name="btn_save" type="Button" parent="."]
layout_mode = 0

View File

@@ -1,18 +1,18 @@
[gd_scene load_steps=10 format=3 uid="uid://b276iygic5itk"]
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_vmjjl"]
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_ew6j4"]
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="3_38cyn"]
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="4_6pit6"]
[ext_resource type="Script" path="res://table/table.gd" id="5_0lwxu"]
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="6_v4chn"]
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="7_pvt8f"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_r2k1p"]
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="9_lr4kl"]
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_vv3tp"]
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_u5cml"]
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="3_pdcng"]
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="4_8v5eg"]
[ext_resource type="Script" path="res://table/table.gd" id="5_05nqo"]
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="6_ysooq"]
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="7_2wau6"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_t8tu6"]
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="9_bx7tk"]
[node name="Работа" type="Panel"]
script = ExtResource("1_vmjjl")
Bip = ExtResource("2_ew6j4")
script = ExtResource("1_vv3tp")
Bip = ExtResource("2_u5cml")
col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627)
col_red = Color(1, 0.568627, 0.431373, 0.239216)
drag_scale_band = 0.05
@@ -40,7 +40,7 @@ offset_bottom = 1169.0
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("3_38cyn")
texture = ExtResource("3_pdcng")
patch_margin_left = 15
patch_margin_top = 30
patch_margin_right = 15
@@ -64,18 +64,18 @@ offset_left = 4.0
offset_top = 51.0
offset_right = 476.0
offset_bottom = 282.0
script = ExtResource("4_6pit6")
script = ExtResource("4_8v5eg")
[node name="table" type="GridContainer" parent="grd_side/frm_threats/scroll"]
layout_mode = 2
columns = 4
script = ExtResource("5_0lwxu")
script = ExtResource("5_05nqo")
[node name="frm_params" type="NinePatchRect" parent="grd_side"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("3_38cyn")
texture = ExtResource("3_pdcng")
patch_margin_left = 15
patch_margin_top = 30
patch_margin_right = 15
@@ -99,17 +99,17 @@ offset_left = 4.0
offset_top = 27.0
offset_right = 476.0
offset_bottom = 282.0
script = ExtResource("6_v4chn")
script = ExtResource("6_ysooq")
[node name="table" type="GridContainer" parent="grd_side/frm_params/scroll"]
layout_mode = 2
script = ExtResource("5_0lwxu")
script = ExtResource("5_05nqo")
[node name="frm_ecm_list" type="NinePatchRect" parent="grd_side"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("3_38cyn")
texture = ExtResource("3_pdcng")
patch_margin_left = 15
patch_margin_top = 30
patch_margin_right = 15
@@ -136,13 +136,13 @@ offset_bottom = 285.0
[node name="table" type="GridContainer" parent="grd_side/frm_ecm_list/scroll"]
layout_mode = 2
script = ExtResource("5_0lwxu")
script = ExtResource("5_05nqo")
[node name="frm_ecm_params" type="NinePatchRect" parent="grd_side"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("3_38cyn")
texture = ExtResource("3_pdcng")
patch_margin_left = 15
patch_margin_top = 30
patch_margin_right = 15
@@ -169,12 +169,12 @@ offset_bottom = 282.0
[node name="table" type="GridContainer" parent="grd_side/frm_ecm_params/scroll"]
layout_mode = 2
script = ExtResource("5_0lwxu")
script = ExtResource("5_05nqo")
[node name="canvas" parent="." instance=ExtResource("7_pvt8f")]
[node name="canvas" parent="." instance=ExtResource("7_2wau6")]
metadata/_edit_lock_ = true
[node name="btn_auto_threat" parent="." instance=ExtResource("8_r2k1p")]
[node name="btn_auto_threat" parent="." instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 912.0
offset_top = 67.0
@@ -182,7 +182,7 @@ offset_right = 1102.0
offset_bottom = 117.0
text = "Автоматически"
[node name="btn_strobe" parent="." instance=ExtResource("8_r2k1p")]
[node name="btn_strobe" parent="." instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 912.0
offset_top = 6.0
@@ -190,7 +190,7 @@ offset_right = 1102.0
offset_bottom = 56.0
text = "Строб"
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 980.0
@@ -202,7 +202,7 @@ grow_vertical = 2
text = "ОЗП-1"
metadata/rfi_name = "ozp1"
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 840.0
offset_top = 1118.0
@@ -211,7 +211,7 @@ offset_bottom = 1168.0
text = "СВ-М2"
metadata/rfi_name = "svm2"
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 910.0
offset_top = 1118.0
@@ -220,7 +220,7 @@ offset_bottom = 1168.0
text = "K1"
metadata/rfi_name = "k1"
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 770.0
offset_top = 1118.0
@@ -229,7 +229,7 @@ offset_bottom = 1168.0
text = "СВ-И1"
metadata/rfi_name = "svi1"
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 700.0
offset_top = 1118.0
@@ -238,7 +238,7 @@ offset_bottom = 1168.0
text = "ПД-ЧМ"
metadata/rfi_name = "pdchm"
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 630.0
@@ -250,7 +250,7 @@ grow_vertical = 2
text = "ПД-М4С"
metadata/rfi_name = "pdm4s"
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 350.0
offset_top = 1118.0
@@ -259,7 +259,7 @@ offset_bottom = 1168.0
text = "ЛЧМ-1"
metadata/rfi_name = "lchm1"
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 420.0
@@ -271,7 +271,7 @@ grow_vertical = 2
text = "МЧМ-1"
metadata/rfi_name = "mchm1"
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 490.0
@@ -283,7 +283,7 @@ grow_vertical = 2
text = "ПД-М2"
metadata/rfi_name = "pdm2"
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 560.0
@@ -295,7 +295,7 @@ grow_vertical = 2
text = "ПД-М4"
metadata/rfi_name = "pdm4"
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 1
anchors_preset = -1
offset_left = 280.0
@@ -307,7 +307,7 @@ grow_vertical = 2
text = "СРН-М2"
metadata/rfi_name = "srnm2"
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 210.0
offset_top = 1118.0
@@ -316,7 +316,7 @@ offset_bottom = 1168.0
text = "СРН-И1"
metadata/rfi_name = "srni1"
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 140.0
offset_top = 1118.0
@@ -326,7 +326,7 @@ text = "Откл."
pressed = true
metadata/rfi_name = "<off>"
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_t8tu6")]
layout_mode = 0
offset_left = 10.0
offset_top = 1118.0
@@ -342,7 +342,7 @@ offset_left = 96.0
offset_top = 109.0
offset_right = 164.0
offset_bottom = 142.0
theme_override_fonts/font = ExtResource("9_lr4kl")
theme_override_fonts/font = ExtResource("9_bx7tk")
theme_override_font_sizes/font_size = 20
text = "88"
vertical_alignment = 1
@@ -351,7 +351,7 @@ vertical_alignment = 1
layout_mode = 0
offset_right = 68.0
offset_bottom = 33.0
theme_override_fonts/font = ExtResource("9_lr4kl")
theme_override_fonts/font = ExtResource("9_bx7tk")
theme_override_font_sizes/font_size = 20
text = "00"
vertical_alignment = 1
@@ -363,7 +363,7 @@ offset_left = 96.0
offset_top = 29.0
offset_right = 188.0
offset_bottom = 88.0
theme_override_fonts/font = ExtResource("9_lr4kl")
theme_override_fonts/font = ExtResource("9_bx7tk")
theme_override_font_sizes/font_size = 56
text = "88"
@@ -371,7 +371,7 @@ text = "88"
layout_mode = 0
offset_right = 92.0
offset_bottom = 59.0
theme_override_fonts/font = ExtResource("9_lr4kl")
theme_override_fonts/font = ExtResource("9_bx7tk")
theme_override_font_sizes/font_size = 56
text = "00"