HwCap::HwCap(QWidget *parent, struct sr_dev_inst *sdi) :
QDialog(parent),
+ _layout(this),
+ _button_box(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
+ Qt::Horizontal, this),
_hw_cap_binding(sdi)
{
+ connect(&_button_box, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(&_button_box, SIGNAL(rejected()), this, SLOT(reject()));
+
+ setLayout(&_layout);
+
+ QWidget *const form = _hw_cap_binding.get_form(this);
+ _layout.addWidget(form);
+
+ _layout.addWidget(&_button_box);
}
} // namespace dialogs
#define PULSEVIEW_PV_HWCAP_H
#include <QDialog>
+#include <QDialogButtonBox>
+#include <QVBoxLayout>
#include <pv/prop/binding/hwcap.h>
HwCap(QWidget *parent, struct sr_dev_inst *sdi);
private:
+ QVBoxLayout _layout;
+ QDialogButtonBox _button_box;
+
pv::prop::binding::HwCap _hw_cap_binding;
};