命名审查与垃圾代码清理(纯重命名 / 死代码删除,无行为变更)
前提:加载完成后全部采样都已驻留内存,程序此后与源文件再无联系。 据此修正了一批会让人误以为"仍在读写文件"的命名: - SampleFileAt → SampleSignalAt(取的是内存信号在给定时刻的采样值)。 - DataSet::AddPreparedFile → AddDataFile。 - PlotView::InvalidatePolylineCache → InvalidateDerivedCaches (它同时清空折线、边沿统计、中心平均值曲线、静态场景缓存与悬停引用)。 - PlotView::CursorColor(int which) → CursorColor()(两条光标同色,参数从未使用)。 - UiEllipsize(g,…) → UiEllipsize(…):纯测量不绘制,删掉被忽略的绘图上下文参数; 同时删除与 UiMeasureTextWidth 完全重复的 UiTextWidth,调用点统一到 UiMeasureTextWidth。 清理残留参数((void)xxx;): - TabConfig 的可见性/网格族(SetVisible / ToggleVisible / SetFileVisible / SetAllVisible / SoloSignal / SetMode / SyncLanes / FileHasVisible / FileAllVisible)去掉从未使用的 const DataSet& 参数(仅 SyncToDataSet 真正需要数据层,保留)。 - PlotView::OnLButtonUp(int y)、OnMouseWheel(int delta, bool shift);PainterSignalHalo 去掉未用的 ref。 - BuildDataFile 中未使用的局部 rowCount。 删除无人调用的死函数: DataSet::Clear / AddFromTable;SignalColorCount;WideToUtf8 / StartsWith; PlotView::ViewMinTime / ViewMaxTime / EdgePanelRect / EdgePanelCloseRect / EdgeCenterPanelRect / ScaleLaneRange / BeginLaneValueEdit / LaneContentHeight; SignalPanel::NeedsScrollBar / IsFilterEditing / FilterText / ContentHeight; PopupMenu::EditingItemId;TabBar::IsDragging;TextEdit::PlaceCaret。 删除只写不读的死字段:CsvTable::sourceRowCount(与 rowCount 等义)与 skippedRowCount。 以 VERY_BIG_DATA.CSV 回归验证:加载与勾选、筛选框(含"无匹配的筛选信号")、 样式区线宽文案省略、选区放大(横向与纵向)、双光标读数与 Δt、右键菜单(Y 轴数值与 实验性功能子菜单)、合并/拆分网格、标签与信号重命名省略号,行为均与改动前一致; make clean && make all 无任何警告。
This commit is contained in:
1 parent
f5028b1e18
commit
350538c634
21 files changed
+118
-456
No files matched your search
@@ -78,12 +78,6 @@ namespace jdi
|
||||
*/
|
||||
void InvalidateRows() { m_rowsDirty = true; }
|
||||
|
||||
/**
|
||||
* @brief 判断列表内容是否需要纵向滚动。
|
||||
* @return 内容超出可视区域返回 true。
|
||||
*/
|
||||
bool NeedsScrollBar() const { return m_contentHeight > m_listRect.Height + 0.5f; }
|
||||
|
||||
/**
|
||||
* @brief 设置 DPI 缩放比例。
|
||||
* @param [IN] scale 缩放比例(1.0 对应 96 DPI)。
|
||||
@@ -187,18 +181,6 @@ namespace jdi
|
||||
*/
|
||||
bool EndFilterEdit();
|
||||
|
||||
/**
|
||||
* @brief 筛选框是否处于编辑状态。
|
||||
* @return 编辑中返回 true。
|
||||
*/
|
||||
bool IsFilterEditing() const { return m_filterEditing; }
|
||||
|
||||
/**
|
||||
* @brief 获取当前筛选文本。
|
||||
* @return 筛选文本(未输入时为空串)。
|
||||
*/
|
||||
const std::wstring& FilterText() const { return m_filterText; }
|
||||
|
||||
/**
|
||||
* @brief 向当前输入框送入一个字符。
|
||||
* @param [IN] character 输入字符('\r' 提交、'\b' 退格、0x03 复制)。
|
||||
@@ -385,12 +367,6 @@ namespace jdi
|
||||
*/
|
||||
void RefreshScrollBar();
|
||||
|
||||
/**
|
||||
* @brief 计算列表内容总高度。
|
||||
* @return 内容高度(像素)。
|
||||
*/
|
||||
float ContentHeight() const;
|
||||
|
||||
/**
|
||||
* @brief 限制滚动偏移量到合法范围。
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user