Merged develop into feature
--HG-- branch : feature
This commit is contained in:
commit
39afb81321
|
@ -68,13 +68,15 @@ void VWidgetDetails::UpdateList()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VWidgetDetails::InLayoutStateChanged(int row, int column)
|
||||
{
|
||||
QTableWidgetItem *item = ui->tableWidget->item(row, 0);
|
||||
const quint32 id = item->data(Qt::UserRole).toUInt();
|
||||
emit Highlight(id);
|
||||
|
||||
if (column != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QTableWidgetItem *item = ui->tableWidget->item(row, column);
|
||||
const quint32 id = item->data(Qt::UserRole).toUInt();
|
||||
const QHash<quint32, VDetail> *allDetails = m_data->DataDetails();
|
||||
const bool inLayout = not allDetails->value(id).IsInLayout();
|
||||
|
||||
|
|
|
@ -48,6 +48,9 @@ public:
|
|||
explicit VWidgetDetails(VContainer *data, VAbstractPattern *doc, QWidget *parent = nullptr);
|
||||
virtual ~VWidgetDetails();
|
||||
|
||||
signals:
|
||||
void Highlight(quint32 id);
|
||||
|
||||
public slots:
|
||||
void UpdateList();
|
||||
|
||||
|
|
|
@ -3510,6 +3510,7 @@ void MainWindow::InitDocksContain()
|
|||
|
||||
detailsWidget = new VWidgetDetails(pattern, doc, this);
|
||||
connect(doc, &VPattern::FullUpdateFromFile, detailsWidget, &VWidgetDetails::UpdateList);
|
||||
connect(detailsWidget, &VWidgetDetails::Highlight, sceneDetails, &VMainGraphicsScene::HighlightItem);
|
||||
detailsWidget->setVisible(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -757,7 +757,6 @@ void QmuParserBase::ApplyFunc( QStack<token_type> &a_stOpt, QStack<token_type> &
|
|||
}
|
||||
|
||||
token_type funTok = a_stOpt.pop();
|
||||
// cppcheck-suppress assertWithSideEffect
|
||||
assert(funTok.GetFuncAddr());
|
||||
|
||||
// Binary operators must rely on their internal operator number
|
||||
|
|
|
@ -354,6 +354,7 @@ void VToolDetail::Create(const quint32 &_id, const VDetail &newDetail, VMainGrap
|
|||
connect(detail, &VToolDetail::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
|
||||
connect(scene, &VMainGraphicsScene::EnableDetailItemHover, detail, &VToolDetail::AllowHover);
|
||||
connect(scene, &VMainGraphicsScene::EnableDetailItemSelection, detail, &VToolDetail::AllowSelecting);
|
||||
connect(scene, &VMainGraphicsScene::HighlightDetail, detail, &VToolDetail::Highlight);
|
||||
doc->AddTool(id, detail);
|
||||
}
|
||||
}
|
||||
|
@ -1262,3 +1263,9 @@ void VToolDetail::retranslateUi()
|
|||
UpdateLabel();
|
||||
UpdatePatternInfo();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolDetail::Highlight(quint32 id)
|
||||
{
|
||||
setSelected(this->id == id);
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ public slots:
|
|||
virtual void ResetChildren(QGraphicsItem* pItem);
|
||||
virtual void UpdateAll();
|
||||
virtual void retranslateUi();
|
||||
void Highlight(quint32 id);
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget) Q_DECL_OVERRIDE;
|
||||
|
|
|
@ -155,7 +155,7 @@ qreal VisToolMove::LengthValue() const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VisToolMove::SetLength(const QString &expression)
|
||||
{
|
||||
length = FindVal(expression, Visualization::data->PlainVariables());
|
||||
length = FindLength(expression, Visualization::data->PlainVariables());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -303,6 +303,12 @@ void VMainGraphicsScene::ItemsSelection(const SelectionType &type)
|
|||
emit ItemSelection(type);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VMainGraphicsScene::HighlightItem(quint32 id)
|
||||
{
|
||||
emit HighlightDetail(id);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VMainGraphicsScene::ToggleLabelSelection(bool enabled)
|
||||
{
|
||||
|
|
|
@ -75,6 +75,7 @@ public slots:
|
|||
void EnableItemMove(bool move);
|
||||
void EnableDetailsMode(bool mode);
|
||||
void ItemsSelection(const SelectionType &type);
|
||||
void HighlightItem(quint32 id);
|
||||
|
||||
void ToggleLabelSelection(bool enabled);
|
||||
void TogglePointSelection(bool enabled);
|
||||
|
@ -126,6 +127,7 @@ signals:
|
|||
void EnableToolMove(bool move);
|
||||
void CurveDetailsMode(bool mode);
|
||||
void ItemSelection(const SelectionType &type);
|
||||
void HighlightDetail(quint32 id);
|
||||
|
||||
void EnableLabelItemSelection(bool enable);
|
||||
void EnablePointItemSelection(bool enable);
|
||||
|
|
Loading…
Reference in New Issue
Block a user