You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
589 B
25 lines
589 B
7 years ago
|
#include "%{WindowHdrName}"
|
||
|
#include "ui_%{WindowHdrName}"
|
||
|
#include <qtmvvmbinding.h>
|
||
|
|
||
|
%{WindowCn}::%{WindowCn}(Control *mControl, QWidget *parent) :
|
||
|
QMainWindow(parent),
|
||
|
control(static_cast<%{ControlCn}*>(mControl)),
|
||
|
ui(new Ui::%{WindowCn})
|
||
|
{
|
||
|
ui->setupUi(this);
|
||
|
@if '%{UseSettings}'
|
||
|
|
||
|
connect(ui->actionSettings, &QAction::triggered,
|
||
|
control, &%{ControlCn}::showSettings);
|
||
|
@endif
|
||
|
|
||
|
QtMvvmBinding::bind(control, "text", ui->lineEdit, "text");
|
||
|
QtMvvmBinding::bind(control, "text", ui->label, "text", QtMvvmBinding::OneWayFromControl);
|
||
|
}
|
||
|
|
||
|
%{WindowCn}::~%{WindowCn}()
|
||
|
{
|
||
|
delete ui;
|
||
|
}
|