//************************************************************* // This function is called from the main NixNote class. // it will reset the items which are selected based upon // what the user did somewhere else (outside this widget). //************************************************************* void LineEdit::updateSelection() { blockSignals(true); FilterCriteria *criteria = global.filterCriteria[global.filterPosition]; // if (criteria->resetSearchString) { // this->blockSignals(true); // this->setText(defaultText); // setStyleSheet(inactiveColor); // this->blockSignals(false); // } if (global.filterPosition != filterPosition) { if (criteria->resetSearchString) { setText(defaultText); setStyleSheet(inactiveColor); } if (criteria->isSearchStringSet()) { setText(criteria->getSearchString()); setStyleSheet(activeColor); } } filterPosition = global.filterPosition; blockSignals(false); }
/* If we have search criteria, then we highlight the text matching those results in the note. */ void NoteFormatter::setHighlight() { FilterCriteria *criteria = global.filterCriteria[global.filterPosition]; if (criteria->isSearchStringSet()) enableHighlight = true; else enableHighlight = false; }