| 12 | #include <eeleditor.h> |
| 13 | |
| 14 | LiveprogSelectionWidget::LiveprogSelectionWidget(QWidget *parent) : |
| 15 | QWidget(parent), |
| 16 | ui(new Ui::LiveprogSelectionWidget) |
| 17 | { |
| 18 | ui->setupUi(this); |
| 19 | |
| 20 | _eelParser = new EELParser(); |
| 21 | |
| 22 | ui->files->setFileTypes(QStringList("*.eel")); |
| 23 | |
| 24 | ui->reset->hide(); |
| 25 | |
| 26 | connect(ui->files, &FileSelectionWidget::fileChanged, this, &LiveprogSelectionWidget::onFileChanged); |
| 27 | connect(ui->reset, &QAbstractButton::clicked, this, &LiveprogSelectionWidget::onResetLiveprogParams); |
| 28 | connect(ui->enable, &QCheckBox::stateChanged, this, &LiveprogSelectionWidget::toggled); |
| 29 | connect(ui->editScript, &QAbstractButton::clicked, this, &LiveprogSelectionWidget::onEditScript); |
| 30 | |
| 31 | if (!QFile(_currentLiveprog).exists()) |
| 32 | { |
| 33 | ui->files->setCurrentDirectory(AppConfig::instance().getLiveprogPath()); |
| 34 | } |
| 35 | else |
| 36 | { |
| 37 | ui->files->setCurrentFile(_currentLiveprog); |
| 38 | loadProperties(_currentLiveprog); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | LiveprogSelectionWidget::~LiveprogSelectionWidget() |
| 43 | { |
nothing calls this directly
no test coverage detected