Example #1
0
QListViewItemExt::QListViewItemExt(QTableWidgetItem* item,QTableWidgetItem* after)
              :QTableWidgetItem()
{
  QTableWidget* parent = item->tableWidget();
  mParent = parent;
  mRow = parent->row(after);

  parent->insertRow(mRow);
  parent->setItem(mRow, 0, this);
  mIndex = -1;
  mHiddenText = QString::null;
}
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_);
}
Example #3
0
QListViewItemExt::QListViewItemExt(QTableWidgetItem* item,
                                   QTableWidgetItem* after,QString label1,
                                   QString label2,QString label3,
                                   QString label4,QString label5,
                                   QString label6,QString label7,
                                   QString label8)
{
    QTableWidget* parent = item->tableWidget();
    mParent = parent;
    mIndex = -1;
    mHiddenText = QString::null;
    mRow = parent->row(after);

    parent->insertRow(mRow);
    parent->setColumnCount(8);
    addWidgets(parent, label1, label2, label3, label4, label5, label6,
               label7, label8);
  mIndex = -1;
  mHiddenText = QString::null;
}