new_music_d::new_music_d(QWidget *parent) : QDialog(parent), ui(new Ui::new_music_d) { ui->setupUi(this); //CHECK DIR QDir dir = QDir::current(); if (!dir.exists("music")) if(!dir.mkdir("music")) QMessageBox::warning(this, tr("Dance class"), tr("Cannot create directory 'music'.")); model = new QFileSystemModel; model->setRootPath(dir.absoluteFilePath("music")); update_tree(); connect(ui->treeView, SIGNAL(clicked(QModelIndex)), this, SLOT(check_choice(QModelIndex))); connect(ui->treeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(add_choice(QModelIndex))); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(create_music())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); }
RadioInfo::RadioInfo(std::string s) { src = s; create_music(); }