转换UTF8格式提交文件

This commit is contained in:
zhaolei 2025-12-01 17:34:30 +08:00
parent f78bed60d3
commit 9238fe34ab
3 changed files with 37 additions and 39 deletions

View File

@ -92,11 +92,9 @@ INCLUDEPATH += ../../OSGFramework/include
INCLUDEPATH += ../../common
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lConvertorManagerd
LIBS += -L../../Bin -lBaseFund
LIBS += -L../../Bin -lslfiod
} else {
LIBS += -L../../Bin -lConvertorManager
LIBS += -L../../Bin -lBaseFun
LIBS += -L../../Bin -lslfio
}

View File

@ -1,4 +1,4 @@
#include "dataslothelper.h"
#include "dataslothelper.h"
#include <QItemSelectionModel>
#include <QListIterator>
@ -28,22 +28,22 @@ DataSlotHelper * DataSlotHelper::instance()
void DataSlotHelper::movedUp(QTableWidget *table)
{
bool moveUpMax=false;
//重置选择区域
//重置选择区域
resetRangeSelection(table);
m_sourceRowsData.clear();
m_descRowsData.clear();
//拾取表格数据
//拾取表格数据
pickTableRangeData(table,m_sourceRowsData);
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
tableSelectionRangeChange(table,true,moveUpMax);
if (moveUpMax)
{
return;
}
pickTableRangeData(table,m_descRowsData);
//交换移动原始数据和移动的目标数据
//交换移动原始数据和移动的目标数据
swapSelRowMoveRow(true);
//刷新移动数据
//刷新移动数据
updateMoveRowData(table);
m_sourceRowsData.clear();
m_descRowsData.clear();
@ -68,7 +68,7 @@ void DataSlotHelper::movedDow(QTableWidget *table)
m_descRowsData.clear();
}
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
void DataSlotHelper::tableSelectionRangeChange(QTableWidget *table,bool isUp,bool &moveFixed)
{
QList<QTableWidgetSelectionRange> selRanges=table->selectedRanges();
@ -219,7 +219,7 @@ void DataSlotHelper::megerRange(QList<QTableWidgetSelectionRange> &rangeLst,
}
//选中移动范围
//选中移动范围
void DataSlotHelper::rangeMoveRow(int &beginRow,int &endRow,int rowCount,bool isUp,bool &moveFixed)
{
@ -255,7 +255,7 @@ void DataSlotHelper::rangeMoveRow(int &beginRow,int &endRow,int rowCount,bool is
}
}
//获取表格行数据
//获取表格行数据
QStringList DataSlotHelper::tableRowData(QTableWidget* table,int row)
{
QStringList rowData;
@ -273,7 +273,7 @@ QStringList DataSlotHelper::tableRowData(QTableWidget* table,int row)
return rowData;
}
//拾取表格数据
//拾取表格数据
void DataSlotHelper::pickTableRangeData(QTableWidget* table,
QList<PinkTableData> &rangeData)
{
@ -302,7 +302,7 @@ void DataSlotHelper::pickTableRangeData(QTableWidget* table,
rangeData << PinkTableData(range,rgData);
}
}
//交换移动原始数据和移动的目标数据
//交换移动原始数据和移动的目标数据
void DataSlotHelper::swapSelRowMoveRow(bool isUp)
{
@ -327,15 +327,15 @@ void DataSlotHelper::swapSelRowMoveRow(bool isUp)
QList<QStringList> srcRowData;
QList<QStringList> desRowData;
int desSize=0;
//目标与源进行交换
//目标与源进行交换
for (int i=0;i<sSize;i++)
{
//源插入到目标
//源插入到目标
srcRange=sourceKeys.value(i);
srcRowData=sourceValues.value(i);
/////////////////////////////////////////////
//目标插入到源
//目标插入到源
desRange=descKeys.value(i);
desRowData=descValues.value(i);
@ -352,7 +352,7 @@ void DataSlotHelper::swapSelRowMoveRow(bool isUp)
}
//重置数据行
//重置数据行
void DataSlotHelper::resetNewDaataRow(QList< QList<QStringList> > & restDataRow,bool isUp)
{
QList<QStringList> rangeRowData;
@ -390,7 +390,7 @@ void DataSlotHelper::resetNewDaataRow(QList< QList<QStringList> > & restDataRow,
restDataRow=result;
}
//分离表格数据和范围
//分离表格数据和范围
void DataSlotHelper::pinkTableDataRanges(const QList<PinkTableData> &pinkData,
QList<QTableWidgetSelectionRange> &ranges,QList< QList<QStringList> > &rowsData)
{
@ -406,15 +406,15 @@ void DataSlotHelper::pinkTableDataRanges(const QList<PinkTableData> &pinkData,
}
}
//刷新移动数据
//刷新移动数据
void DataSlotHelper::updateMoveRowData(QTableWidget* table)
{
//先目标再源
//先目标再源
updateRowsData(table,m_descRowsData);
updateRowsData(table,m_sourceRowsData);
}
//刷新移动数据
//刷新移动数据
void DataSlotHelper::updateRowsData(QTableWidget* table,
const QList<PinkTableData> &data)
{
@ -452,7 +452,7 @@ void DataSlotHelper::updateRowsData(QTableWidget* table,
}
}
//刷新表格视图数据
//刷新表格视图数据
void DataSlotHelper::updateTableView(QTableWidget *table,const QStringList &rowsData,int row)
{
if ( NULL == table)

View File

@ -1,4 +1,4 @@
#ifndef DATASLOTHELPER_H
#ifndef DATASLOTHELPER_H
#define DATASLOTHELPER_H
#include <QObject>
@ -25,37 +25,37 @@ public:
~DataSlotHelper();
static DataSlotHelper *instance();
//向上移动
//向上移动
void movedUp(QTableWidget *table);
//向下移动
//向下移动
void movedDow(QTableWidget *table);
private:
//获取表格行数据
//获取表格行数据
QStringList tableRowData(QTableWidget* table,int row);
//拾取表格数据
//拾取表格数据
void pickTableRangeData(QTableWidget* table
,QList<PinkTableData> &rangeData);
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
//表格数据改变 isUp 是否向上moveFixed是否到头固定模式
void tableSelectionRangeChange(QTableWidget *table,bool isUp,bool &moveFixed);
//选中移动范围
//选中移动范围
void rangeMoveRow(int &beginRow,int &endRow,int rowCount,bool isUp,bool &moveFixed);
//交换移动原始数据和移动的目标数据
//交换移动原始数据和移动的目标数据
void swapSelRowMoveRow(bool isUp);
//刷新移动数据
//刷新移动数据
void updateMoveRowData(QTableWidget* table);
//刷新行数据
//刷新行数据
void updateRowsData(QTableWidget* table,const QList<PinkTableData> &data);
//刷新表格视图数据
//刷新表格视图数据
void updateTableView(QTableWidget *table,const QStringList& rowsData,int row);
//分离表格数据和范围
//分离表格数据和范围
void pinkTableDataRanges(const QList<PinkTableData> &pinkData,
QList<QTableWidgetSelectionRange> &ranges,QList< QList<QStringList> > &rowsData);
//重置数据行
//重置数据行
void resetNewDaataRow(QList< QList<QStringList> > & restDataRow,bool isUp);
//重置选择区域
//重置选择区域
void resetRangeSelection(QTableWidget* table);
//合并单选行
//合并单选行
void megerRange(QList<QTableWidgetSelectionRange> &rangeLst,const QList<QTableWidgetSelectionRange> &selRanges);
private:
@ -68,9 +68,9 @@ explicit DataSlotHelper(QObject *parent=NULL);
private:
static DataSlotHelper *p_helper;
GC m_gc;
//源行数据
//源行数据
QList<PinkTableData> m_sourceRowsData;
//目标数据
//目标数据
QList<PinkTableData> m_descRowsData;