static void pslLiftSubrangeBlat(char *inPsl, char *outPsl, char *qSizesFile, char *tSizesFile) /* pslLiftSubrangeBlat - lift PSLs from blat subrange alignments. */ { struct hash *qSizes = (qSizesFile != NULL) ? loadSizes(qSizesFile) : NULL; struct hash *tSizes = (tSizesFile != NULL) ? loadSizes(tSizesFile) : NULL; struct pslReader *inRd = pslReaderFile(inPsl, NULL); FILE *outFh = mustOpen(outPsl, "w"); struct psl *psl; while ((psl = pslReaderNext(inRd)) != NULL) { liftIt(psl, qSizes, tSizes); pslTabOut(psl, outFh); pslFree(&psl); } carefulClose(&outFh); pslReaderFree(&inRd); }
void BtFontChooserWidget::styleChanged(QListWidgetItem* current, QListWidgetItem* /*previous*/) { if (current == nullptr) return; QString styleString = current->text(); setFontStyle(styleString, &m_font); // Save style if the user choose it if (m_styleListWidget->hasFocus()) m_choosenStyle = styleString; loadSizes(m_fontListWidget->currentItem()->text(), styleString); outputHtmlText(); emit fontSelected(m_font); }
void BtFontChooserWidget::setFont(const QFont& font) { disconnect(m_fontListWidget, nullptr, nullptr, nullptr); disconnect(m_styleListWidget, nullptr, nullptr, nullptr); disconnect(m_sizeListWidget, nullptr, nullptr, nullptr); // set the font m_font = font; const QString fontFamily = font.family(); restoreListWidgetValue(m_fontListWidget, fontFamily); // set the style loadStyles(fontFamily); QFontDatabase database; const QString styleString = database.styleString(m_font); m_choosenStyle = styleString; restoreListWidgetValue(m_styleListWidget, styleString); // set the size loadSizes(fontFamily, styleString); restoreListWidgetValue(m_sizeListWidget, QString::number(m_font.pointSize()) ); outputHtmlText(); connectListWidgets(); }