void Pulsars::readSettingsFromConfig(void) { conf->beginGroup("Pulsars"); updateUrl = conf->value("url", "https://stellarium.org/json/pulsars.json").toString(); updateFrequencyDays = conf->value("update_frequency_days", 100).toInt(); lastUpdate = QDateTime::fromString(conf->value("last_update", "2012-05-24T12:00:00").toString(), Qt::ISODate); updatesEnabled = conf->value("updates_enabled", true).toBool(); setDisplayMode(conf->value("distribution_enabled", false).toBool()); setGlitchFlag(conf->value("use_separate_colors", false).toBool()); setFilteredMode(conf->value("filter_enabled", false).toBool()); setFilterValue(conf->value("filter_value", 150.f).toFloat()); setMarkerColor(StelUtils::strToVec3f(conf->value("marker_color", "0.4,0.5,1.0").toString())); setGlitchColor(StelUtils::strToVec3f(conf->value("glitch_color", "0.2,0.3,1.0").toString())); enableAtStartup = conf->value("enable_at_startup", false).toBool(); flagShowPulsarsButton = conf->value("flag_show_pulsars_button", true).toBool(); conf->endGroup(); }
void TagTreeNodeString::handleRenaming(int column, const QString& text) { TagNodeString* tagNode = dynamic_cast<TagNodeString*>(m_tagNode); switch (column) { case TagTree::COLUMN_TEXT: break; case TagTree::COLUMN_VALUE: { QPtrListIterator<KFileItem> it(*m_photobook->view()->fileView()->selectedItems()); // loop over all selected files and change their state it.toFirst(); for (; it.current(); ++it) { File* selectedFile = dynamic_cast<File*>(it.current()); tagNode->setTagged(selectedFile, text); } //update my internal state... m_tagCurrentMatch = text.isEmpty() ? TagTreeNode::UNTAGGED : TagTreeNode::TAGGED; //and then update all of my parents TagTreeNode* node = this; while (node) { node->recursiveFindTagged(); node->repaint(); node = dynamic_cast<TagTreeNode*>(node->parent()); } m_photobook->dirtyfy(); break; } case TagTree::COLUMN_FILTER: { // filter has changed --> update the text in the node and auto refresh view setFilterValue(text); m_photobook->autoRefreshView(); break; } } }