Тестовый коммит

This commit is contained in:
MaD_CaT
2023-07-25 14:29:30 +03:00
parent 3bc5edbc45
commit 49167f5459
19 changed files with 565 additions and 90 deletions

View File

@@ -1,10 +1,10 @@
[gd_scene load_steps=5 format=3 uid="uid://cfk41dnfbr0wx"]
[gd_scene load_steps=5 format=3 uid="uid://nl1vklubr5kr"]
[ext_resource type="Shader" path="res://shaders/bip.gdshader" id="1_k6vue"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2dulj"]
shader = ExtResource("1_k6vue")
shader_parameter/color = Color(0.666667, 0.690196, 0.807843, 1)
shader_parameter/color = Color(1, 0.101961, 0.494118, 1)
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_tgf76"]

35
scenes/frm_threats.gd Normal file
View File

@@ -0,0 +1,35 @@
extends "res://scenes/рамка.gd"
var TableHeader = preload('res://table/header.tscn')
var TableNode = preload('res://table/node.tscn')
func _ready() -> void:
assert(TableHeader)
assert(TableNode)
call_deferred('init_table')
func init_table():
$scrl_threats/tbl_threats.set_header([TableHeader, TableHeader, TableHeader, TableHeader])
$scrl_threats/tbl_threats.set_header_text(['Номер', 'Пеленг', 'Частота, МГц', 'Назначено'])
$scrl_threats/tbl_threats.set_columns_min_size([50, 140, 140, 100])
$scrl_threats/tbl_threats.pin_header($scrl_threats, self)
$scrl_threats/tbl_threats.connect('row_pressed', Callable(self, 'on_row_pressed'))
func on_row_pressed(i_row: int):
$scrl_threats/tbl_threats.set_row_selected(i_row, true)
func _on_btn_add_thr_pressed() -> void:
var i_row = $scrl_threats/tbl_threats.get_rows_count()
$scrl_threats/tbl_threats.add_row([TableNode, TableNode, TableNode, TableNode])
$scrl_threats/tbl_threats.set_row_text(i_row, ['%d' % i_row, '%d' % ((i_row * 100) + 2000), '%d' % ((i_row * 20) % 360), 'Нет'])
func _on_btn_del_thr_pressed() -> void:
var i_rows: = Array()
$scrl_threats/tbl_threats.get_selected_rows(i_rows)
for i in i_rows:
$scrl_threats/tbl_threats.remove_row(i)

View File

@@ -1,10 +1,6 @@
[gd_scene format=2]
[gd_scene format=3 uid="uid://bv0dyyaodxcvc"]
[node name="pribor_UF" type="Node2D"]
[node name="test_label" type="Label" parent="."]
margin_left = 12.0
margin_top = 8.0
margin_right = 154.0
margin_bottom = 22.0
text = "Здесь будет схема прибора СПТ Правый"

15
scenes/tab_switch.gd Normal file
View File

@@ -0,0 +1,15 @@
extends TabContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _enter_tree() -> void:
REPNetwork.logger_page = $'журнал'

View File

@@ -1,5 +1,6 @@
[gd_scene load_steps=5 format=3 uid="uid://3slb0i3pvowc"]
[ext_resource type="Script" path="res://scenes/tab_switch.gd" id="1_33fiq"]
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="1_uow82"]
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="2_83m7a"]
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="3_hgnup"]
@@ -8,6 +9,7 @@
[node name="tab_switch" type="TabContainer"]
offset_right = 1600.0
offset_bottom = 1200.0
script = ExtResource("1_33fiq")
[node name="работа" parent="." instance=ExtResource("1_uow82")]
layout_mode = 2

View File

@@ -1,9 +1,19 @@
extends Control
func _ready() -> void: Log.info('Модуль журнала работы готов')
func on_line_changed(unit, addr): Log.message(Logger.INFO, 'состоянии связи: %s %s' % [unit, addr])
func on_command_fail(unit, addr): Log.message(Logger.ERROR, 'команда не выполнена: %s %s' % [unit, addr])
func _on_clear_button_down() -> void:
<<<<<<< HEAD
$content.clear()
Log.info('содержание журнала очищено оператором')
=======
$content.clear()
Log.info('Cодержание журнала очищено оператором')
>>>>>>> sasha/master
func _on_btn_save_button_down() -> void:

View File

@@ -15,10 +15,11 @@ script = ExtResource("1_3f1mv")
[node name="content" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 16.0
offset_top = 57.0
offset_top = 16.0
offset_right = 1584.0
offset_bottom = 999.0
offset_bottom = 1059.0
focus_mode = 2
theme_override_colors/selection_color = Color(0.72549, 0.270588, 0.133333, 1)
threaded = true
selection_enabled = true
deselect_on_focus_loss_enabled = false
@@ -26,18 +27,18 @@ script = ExtResource("1_t5g4h")
[node name="btn_save" type="Button" parent="."]
layout_mode = 0
offset_left = 1344.0
offset_top = 1044.0
offset_right = 1440.0
offset_bottom = 1080.0
offset_left = 1464.0
offset_top = 1080.0
offset_right = 1560.0
offset_bottom = 1116.0
text = "Сохранить"
[node name="btn_clear" type="Button" parent="."]
layout_mode = 0
offset_left = 1200.0
offset_top = 1044.0
offset_right = 1296.0
offset_bottom = 1080.0
offset_left = 1344.0
offset_top = 1080.0
offset_right = 1440.0
offset_bottom = 1116.0
text = "Очистить"
[node name="dlg_file" type="FileDialog" parent="."]

View File

@@ -9,7 +9,6 @@ extends Panel
@export var drag_scale_width: float
@export var drag_scale_band: float
@export var window_0_id: int
@export var window_1_id: int
signal add_imit_threat (signal_name: String)
signal del_imit_threat (signal_name: String)
@@ -156,9 +155,14 @@ func toggle_full_screen(id: int):
func _on_full_screen():
<<<<<<< HEAD
toggle_full_screen(window_1_id)
toggle_full_screen(window_0_id)
func _on_btn_down(signal_name: String) -> void:
emit_signal(signal_name)
=======
toggle_full_screen(window_0_id)
>>>>>>> sasha/master

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=7 format=3 uid="uid://b276iygic5itk"]
[gd_scene load_steps=8 format=3 uid="uid://b276iygic5itk"]
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_qjoce"]
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="2_bl0yt"]
[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/frame.tscn" id="3_l1omj"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="4_5es2r"]
[ext_resource type="Script" path="res://scenes/frm_threats.gd" id="4_hg23i"]
[ext_resource type="Script" path="res://table/table.gd" id="4_mqhcf"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ugj8"]
@@ -18,7 +19,6 @@ strob_min_band = 0.1
strob_max_band = 15.538
drag_scale_width = 0.5
drag_scale_band = 0.05
window_1_id = 1
metadata/_edit_vertical_guides_ = []
metadata/_edit_lock_ = true
@@ -31,19 +31,15 @@ offset_left = 1121.0
offset_top = 6.0
offset_right = 1594.0
offset_bottom = 642.0
script = ExtResource("4_hg23i")
text = "Список целей"
[node name="tbl_threats" type="GridContainer" parent="frm_threats"]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("4_mqhcf")
metadata/_edit_lock_ = true
[node name="рамка-параметры-цели" parent="frm_threats" instance=ExtResource("3_l1omj")]
layout_mode = 0
offset_left = 5.0
offset_top = 313.0
offset_right = 467.0
offset_right = 465.0
offset_bottom = 632.0
text = "Параметры цели"
@@ -218,6 +214,19 @@ scale = Vector2(1, 0.6)
tooltip_text = "Удалить цель"
text = "-"
[node name="scrl_threats" type="ScrollContainer" parent="frm_threats"]
layout_mode = 0
offset_left = 8.0
offset_top = 57.0
offset_right = 464.0
offset_bottom = 306.0
horizontal_scroll_mode = 0
[node name="tbl_threats" type="GridContainer" parent="frm_threats/scrl_threats"]
layout_mode = 2
columns = 4
script = ExtResource("4_mqhcf")
[node name="рамка-сеансы-помех" parent="." instance=ExtResource("3_l1omj")]
layout_mode = 0
offset_left = 1121.0
@@ -647,5 +656,5 @@ metadata/rfi_name = "<auto>"
[connection signal="drag_begin" from="." to="." method="_on_drag_begin"]
[connection signal="drag_continue" from="." to="." method="_on_drag_continue"]
[connection signal="full_screen" from="." to="." method="_on_full_screen" flags=3]
[connection signal="button_down" from="frm_threats/btn_add_thr" to="." method="_on_btn_down" binds= ["add_imit_threat"]]
[connection signal="button_down" from="frm_threats/btn_del_thr" to="." method="_on_btn_down" binds= ["del_imit_threat"]]
[connection signal="pressed" from="frm_threats/btn_add_thr" to="frm_threats" method="_on_btn_add_thr_pressed"]
[connection signal="pressed" from="frm_threats/btn_del_thr" to="frm_threats" method="_on_btn_del_thr_pressed"]