void QREnCode::setQrSaveFile(const QString &filepath) { qrFilePath = filepath; if(!qrFilePath.isEmpty()){ saveItemToFile(); } }
CourseEditUI::CourseEditUI(RecondoModel* model, QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) { setupUi(this); _addingNewItem = false; _presenter = new CourseEditPresenter(this, model); _presenter->SetCourseInfoOnView(); _items = _presenter->GetItemsToEdit(); FillTable(); QItemSelectionModel *sm = tableView->selectionModel(); QObject::connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(tableViewCurrentRowChanged(QModelIndex,QModelIndex))); QObject::connect(sm, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(tableViewSelectionChanged(QItemSelection,QItemSelection))); QObject::connect(btnSave, SIGNAL(clicked()), this, SLOT(changeItem())); QObject::connect(okButton, SIGNAL(clicked()), this, SLOT(saveItemToFile())); QObject::connect(btnNew, SIGNAL(clicked()), this, SLOT(addNewItem())); QObject::connect(btnCancel, SIGNAL(clicked()), this, SLOT(cancelAdd())); }