You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a TODO list to the README.md file.
Implements a state management system for regimes, allowing for real-time updates and a more dynamic user interface.
Copy file name to clipboardExpand all lines: README.md
+106-1Lines changed: 106 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,108 @@
1
+
### TODO for Friday, August 8, 2025
2
+
3
+
1.**QML Module API:**
4
+
* Provide a QML API to return the `Regime` class object by row number (id) from `ProtoTableModel`.
5
+
* Provide a signal for the Button delegate in `tableView` (column 0) so that external QML components can react to button clicks, passing the corresponding `Regime` data.
6
+
2.**Default Repeat Count:**
7
+
* Grouping and ungrouping should set the default repeat count to 1.
8
+
3.**Save Changes to JSON:**
9
+
* Ensure that all changes, including grouping, ungrouping, and reordering, are correctly saved back to the `regime_a.json` file.
10
+
4.**Synchronize Scroll Views:**
11
+
* The vertical scroll position of `tableView` and `controlsView` should be synchronized.
12
+
13
+
### План работ на пятницу, 8 августа 2025 г.
14
+
15
+
1.**API модуля QML:**
16
+
* Предоставить API QML для возврата объекта класса `Regime` по номеру строки (id) из `ProtoTableModel`.
17
+
* Предоставить сигнал для делегата `Button` в `tableView` (столбец 0), чтобы внешние компоненты QML могли реагировать на нажатия кнопок, передавая соответствующие данные `Regime`.
18
+
2.**Количество повторений по умолчанию:**
19
+
* Группировка и разгруппировка должны устанавливать количество повторений по умолчанию равным 1.
20
+
3.**Сохранение изменений в JSON:**
21
+
* Убедиться, что все изменения, включая группировку, разгруппировку и изменение порядка, корректно сохраняются обратно в файл `regime_a.json`.
22
+
4.**Синхронизация полос прокрутки:**
23
+
* Положение вертикальной полосы прокрутки `tableView` и `controlsView` должно совпадать.
24
+
25
+
---
26
+
27
+
## Daily Report for 2025-08-07
28
+
29
+
Today's session focused on implementing a "state" property for regimes, allowing for real-time updates and a more dynamic user interface.
30
+
31
+
### C++ Changes:
32
+
33
+
***`regime.h`:**
34
+
* Introduced a `RegimeEnums::State` enum with the following states: `Waiting`, `Stopped`, `Running`, `Paused`, `Skipped`, `Done`, and `Error`.
35
+
* Added `m_state` and `m_timePassedInSeconds` members to the `Regime` struct.
36
+
***`prototablemodel.h` & `prototablemodel.cpp`:**
37
+
* Added a `StateRole` and `TimePassedInSecondsRole` to the model's roles.
38
+
* Updated the `data()` and `setData()` methods to handle the new roles.
39
+
***`regimemanager.h` & `regimemanager.cpp`:**
40
+
* Added a `stateChanged` signal and an `onStateChanged` slot to the `RegimeManager` class to allow for external state updates.
41
+
* The `onStateChanged` slot now accepts the regime index, state, and time passed in seconds.
42
+
***`main.cpp`:**
43
+
* Registered the `RegimeEnums::State` enum with the QML type system.
44
+
45
+
### QML Changes:
46
+
47
+
***`StateDelegate.qml`:**
48
+
* Created a new `StateDelegate.qml` file to display the regime state.
49
+
* The delegate is a `TextField` that displays the state as text with different colors based on the current state.
50
+
* The delegate now calculates and displays the time passed, time left, and total running time based on the state and the `max_time` value.
51
+
***`Main.qml`:**
52
+
* Added a new "State" column to the `TableView`.
53
+
* The new column uses the `StateDelegate` to display the state of each regime.
54
+
***`Utils.js`:**
55
+
* Updated the `formatTime` function to work with seconds.
56
+
57
+
### Build System Changes:
58
+
59
+
***`CMakeLists.txt`:**
60
+
* Added the new `StateDelegate.qml` file to the list of QML files.
61
+
62
+
### Testing Changes:
63
+
64
+
***`tests/test_regimemanager.cpp`:**
65
+
* Updated the tests to reflect the changes in the `RegimeManager` class.
66
+
67
+
## Ежедневный отчет за 2025-08-07
68
+
69
+
Сегодняшняя сессия была посвящена реализации свойства «состояние» для режимов, что обеспечивает обновления в реальном времени и более динамичный пользовательский интерфейс.
70
+
71
+
### Изменения в C++:
72
+
73
+
***`regime.h`:**
74
+
* Введено перечисление `RegimeEnums::State` со следующими состояниями: `Waiting`, `Stopped`, `Running`, `Paused`, `Skipped`, `Done` и `Error`.
75
+
* В структуру `Regime` добавлены члены `m_state` и `m_timePassedInSeconds`.
76
+
***`prototablemodel.h` и `prototablemodel.cpp`:**
77
+
* В роли модели добавлены `StateRole` и `TimePassedInSecondsRole`.
78
+
* Обновлены методы `data()` и `setData()` для обработки новых ролей.
79
+
***`regimemanager.h` и `regimemanager.cpp`:**
80
+
* В класс `RegimeManager` добавлены сигнал `stateChanged` и слот `onStateChanged` для обеспечения возможности обновления состояния извне.
81
+
* Слот `onStateChanged` теперь принимает индекс режима, состояние и прошедшее время в секундах.
82
+
***`main.cpp`:**
83
+
* Зарегистрировано перечисление `RegimeEnums::State` в системе типов QML.
84
+
85
+
### Изменения в QML:
86
+
87
+
***`StateDelegate.qml`:**
88
+
* Создан новый файл `StateDelegate.qml` для отображения состояния режима.
89
+
* Делегат представляет собой `TextField`, который отображает состояние в виде текста с разными цветами в зависимости от текущего состояния.
90
+
* Делегат теперь вычисляет и отображает прошедшее время, оставшееся время и общее время работы в зависимости от состояния и значения `max_time`.
91
+
***`Main.qml`:**
92
+
* В `TableView` добавлена новая колонка «Состояние».
93
+
* Новая колонка использует `StateDelegate` для отображения состояния каждого режима.
94
+
***`Utils.js`:**
95
+
* Обновлена функция `formatTime` для работы с секундами.
96
+
97
+
### Изменения в системе сборки:
98
+
99
+
***`CMakeLists.txt`:**
100
+
* Новый файл `StateDelegate.qml` добавлен в список файлов QML.
101
+
102
+
### Изменения в тестировании:
103
+
104
+
***`tests/test_regimemanager.cpp`:**
105
+
* Обновлены тесты для отражения изменений в классе `RegimeManager`.
1
106
2
107
### TODO for Thursday, August 7, 2025
3
108
@@ -447,4 +552,4 @@ Overall, today's changes have made the application more robust and feature-rich,
447
552
- Изменена модель `ProtoTableModel` для предоставления данных `condition` из `regime_a.json` в качестве пользовательской роли.
448
553
- Обновлен `ConditionDelegateA.qml` для использования данных `condition` из модели, заполняя `ComboBox` и `TextField` правильными значениями.
449
554
- Добавлен новый файл `ConditionDelegateA.qml` в `CMakeLists.txt` для включения его в сборку.
450
-
- Отлажены и исправлены различные ошибки сборки и выполнения, возникшие в ходе разработки.
555
+
- Отлажены и исправлены различные ошибки сборки и выполнения, возникшие в ходе разработки.
0 commit comments