ApplicationCommandInfo ApplicationSettingsFile::getStopAllSoundCommandInfo() { ApplicationCommandInfo commandInfo(CommandID(SoundHotKeyConfigFile::COMMANDS_BASE - 1)); commandInfo.setInfo("Stop All Sounds", "Stops all sounds that are playing", juce::String::empty, 0); if (stopAllSoundsKeys.size() > 0) { const KeyPress &defaultKeyPress = stopAllSoundsKeys.getUnchecked(0); commandInfo.addDefaultKeypress(defaultKeyPress.getKeyCode(), defaultKeyPress.getModifiers()); } return commandInfo; }
void visit(const IEntityClassPtr& eclass) { if (boost::algorithm::starts_with(eclass->getName(), _prefix)) { // We have a match, create a new structure ConversationCommandInfoPtr commandInfo(new ConversationCommandInfo); // Fill the values from the found entityDef commandInfo->parseFromEntityClass(eclass); // Store the structure to the target map _map[commandInfo->name] = commandInfo; } }
QString LinuxProcessInfoGathererHelper::getProcessName(int id) { QFile procFile; QString stat; QString command; QString executable; procFile.setFileName("/proc/" + QString::number(id) + "/cmdline"); if (!procFile.exists()) return QString(); procFile.open(QFile::ReadOnly); stat = QString(procFile.readAll()); command = stat.left(stat.indexOf(QChar('\0'))); QFileInfo commandInfo(command); if (commandInfo.exists()) return commandInfo.fileName(); return command; }