示例#1
0
文件: data.cpp 项目: Chiur/openmw
bool CSMWorld::Data::hasId (const std::string& id) const
{
    return
        getGlobals().searchId (id)!=-1 ||
        getGmsts().searchId (id)!=-1 ||
        getSkills().searchId (id)!=-1 ||
        getClasses().searchId (id)!=-1 ||
        getFactions().searchId (id)!=-1 ||
        getRaces().searchId (id)!=-1 ||
        getSounds().searchId (id)!=-1 ||
        getScripts().searchId (id)!=-1 ||
        getRegions().searchId (id)!=-1 ||
        getBirthsigns().searchId (id)!=-1 ||
        getSpells().searchId (id)!=-1 ||
        getTopics().searchId (id)!=-1 ||
        getJournals().searchId (id)!=-1 ||
        getCells().searchId (id)!=-1 ||
        getReferenceables().searchId (id)!=-1;
}
void SettingsDialog::updateInputImageTopicsList()
{
    //supported types
    QSet<QString> messages_types;
    messages_types.insert("sensor_msgs/Image");

    //curretn topic
    QString selected_topic = ui_->comboBoxInputImageTopicsList->currentText();

    //get topic list
    QStringList topics = getTopics(messages_types).values();
    topics.append("");
    qSort(topics);

    //set topic list
    ui_->comboBoxInputImageTopicsList->clear();
    ui_->comboBoxInputImageTopicsList->insertItems(0, topics);

    //restore previous selection
    selectTopicImage(selected_topic);

}