UatDialog::UatDialog(QWidget *parent, epan_uat *uat) : QDialog(parent), ui(new Ui::UatDialog), uat_(NULL), cur_line_edit_(NULL), cur_combo_box_(NULL) { ui->setupUi(this); ui->deleteToolButton->setEnabled(false); ui->copyToolButton->setEnabled(false); ok_button_ = ui->buttonBox->button(QDialogButtonBox::Ok); help_button_ = ui->buttonBox->button(QDialogButtonBox::Help); #ifdef Q_OS_MAC ui->newToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->deleteToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->copyToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->pathLabel->setAttribute(Qt::WA_MacSmallSize, true); #endif setUat(uat); #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) ui->uatTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents); #else ui->uatTreeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); #endif // Need to add uat_move or uat_insert to the UAT API. ui->uatTreeWidget->setDragEnabled(false); qDebug() << "FIX Add drag reordering to UAT dialog"; }
UatDialog::UatDialog(QWidget *parent, epan_uat *uat) : GeometryStateDialog(parent), ui(new Ui::UatDialog), uat_model_(NULL), uat_delegate_(NULL), uat_(NULL) { ui->setupUi(this); if (uat) loadGeometry(0, 0, uat->name); ui->deleteToolButton->setEnabled(false); ui->copyToolButton->setEnabled(false); ok_button_ = ui->buttonBox->button(QDialogButtonBox::Ok); help_button_ = ui->buttonBox->button(QDialogButtonBox::Help); #ifdef Q_OS_MAC ui->newToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->deleteToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->copyToolButton->setAttribute(Qt::WA_MacSmallSize, true); ui->pathLabel->setAttribute(Qt::WA_MacSmallSize, true); #endif setUat(uat); // FIXME: this prevents the columns from being resized, even if the text // within a combobox needs more space (e.g. in the USER DLT settings). For // very long filenames in the SSL RSA keys dialog, it also results in a // vertical scrollbar. Maybe remove this since the editor is not limited to // the column width (and overlays other fields if more width is needed)? #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) ui->uatTreeView->header()->setResizeMode(QHeaderView::ResizeToContents); #else ui->uatTreeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); #endif // Need to add uat_move or uat_insert to the UAT API. ui->uatTreeView->setDragEnabled(false); qDebug() << "FIX Add drag reordering to UAT dialog"; }