예제 #1
0
void GraphPlotDialog::editGraphName(QTableWidgetItem*item)
{
    QTableWidget *graphList = (QTableWidget*)sender();
    if (item != NULL && graphList->column(item) == 0) {
        QTableWidget *graphList = (QTableWidget*)sender();
        graphList->openPersistentEditor(item);
    }
}
예제 #2
0
void GraphPlotDialog::saveGraphName(QTableWidgetItem*item)
{
    QTableWidget *graphList = (QTableWidget*)sender();
    if (item != NULL && graphList->column(item) == 0) {
        unsigned graphId = item->data(Qt::UserRole).toUInt();
        mData[graphId].name = item->text().toStdString();
        graphList->closePersistentEditor(item);
    }
}
void
MarControlGUI::toMarControl(QTableWidgetItem* cell)
{
	QTableWidget* table = cell->tableWidget();
	int col = table->column(cell);
	int row = table->row(cell);
	
	realvec vec = control_->to<mrs_realvec>();
	vec(row, col) = (mrs_real)(cell->text().toDouble());
	
	control_->setValue(vec);//this is thread safe!
	//emit controlChanged(cname_, control_);
}