AudioSignal& MusicComposer::operator()(const std::string& ent){ string word = ent; char first = word.at(0); if(first == '*') { char second = word.at(1); switch(second) { case 't': changeTrack(ent); break; case 'l': return loadFile(ent); break; case 'e': echo(ent); break; case '~': smallDuration(ent); break; case '=': longDuration(ent); break; case '.': addAll(); break; default : cout << "Oops!!!! There was an invalid character " << endl; } } else { music = readNotes(ent); } return music; }
NoteMgrForm::NoteMgrForm(Account *account, QWidget *parent) : QWidget(parent),ui(new Ui::NoteMgrForm),account(account) { ui->setupUi(this); dbUtil = account->getDbUtil(); ui->stackedWidget->setCurrentIndex(0); readNotes(); connect(ui->lwTitles,SIGNAL(customContextMenuRequested(QPoint)), this,SLOT(titleListContextMenuRequested(QPoint))); sc_save = new QShortcut(QKeySequence("Ctrl+s"),this); connect(sc_save,SIGNAL(activated()),this,SLOT(on_btnSave_clicked())); }
static void showNotesFromFile(gchar *notefile) { gchar *msg = NULL; if (savedAsFilename != NULL) g_free(savedAsFilename); savedAsFilename = notefile; if (readNotes(notefile)) { msg = g_strdup_printf("Notes read from '%s'.", notefile); setStatusText_strdup(msg); g_free(msg); isSaved = TRUE; gtk_widget_set_sensitive(GTK_WIDGET(saveButton), FALSE); printNote(doc_page + 1); } }