Exemplo n.º 1
0
void MainWindow::on_add_clicked()
{
    const int last_row = ui->tableWidget_2->rowCount();
    ui->tableWidget_2->insertRow(last_row);
    QPointer<QCheckBox> Delete = new QCheckBox(this);
    QPointer<QComboBox> Architecture = new QComboBox(this);
    Architecture->addItems(Architecturelistfull);
    for (int i=1; i<Architecture->count();++i)
      Architecture->setItemData(i,"DISABLE",Qt::UserRole-1); //disable architectures other than linear

    ui->tableWidget_2->setCellWidget(last_row,0,Delete);
    ui->tableWidget_2->setCellWidget(last_row,2,Architecture);
    Architecturelist.append(Architecture);
    Deletelist.append(Delete);


    edit_a = new QLineEdit(this);
    edit_a->setValidator(validator);
    ui->tableWidget_2->setCellWidget(last_row,4,edit_a);

    edit_b = new QLineEdit(this);
    edit_b->setValidator(validator);
    ui->tableWidget_2->setCellWidget(last_row,5,edit_b);

    edit_mp = new QLineEdit(this);
    edit_mp->setValidator(validator);
    ui->tableWidget_2->setCellWidget(last_row,6,edit_mp);
}
Exemplo n.º 2
0
 const LayoutIterator & operator++() {
    while (++m_index < m_layout->count() && !qobject_cast<WT*>(m_layout->itemAt(m_index)->widget()));
    return *this;
 }
Exemplo n.º 3
0
 LayoutIterator(QLayout * layout, int dir) :
    m_layout(layout), m_index(dir>0 ? -1 : m_layout->count()) {
    if (dir > 0) ++*this;
 }