//---------------------------------------------------- void MainWindow::inputparameters() { //open result window Editor *myeditor = new Editor; addEditor(myeditor); myeditor->setLineWrapMode(QTextEdit::NoWrap); myeditor->setWindowTitle("Results [*]"); QFont myfont("Courier"); myfont.setPixelSize(12); myeditor->setFont(myfont); QTextCursor cursor(myeditor->textCursor()); cursor.insertText("Version 0.7a\n"); displayInEditor(false, "Pollen Compatibility Calculator\n", "bold", cursor); //display in active window QTextCursor mycursor(activeEditor()->textCursor()); displayInEditor(true, "Input parameters\n", "bold", mycursor); interface::checkedi(mycursor); output1Action->setEnabled(true); inputAction->setEnabled(false); //open inputform inputForm *dialog = new inputForm; dialog->show(); }
mobileView::mobileView(BRect r, const char *name, GSM *g = NULL) : BView(r, name, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED) { // initialize data SetDevice(g); // this->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); BRect r = this->Bounds(); r.InsetBy(5,5); r.bottom = r.top + CAPTION_SIZE; // my top top = r.bottom + 5; this->AddChild(caption = new BStringView(r,"viewCaption",NULL,B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP)); BFont myfont(be_plain_font); myfont.SetSize(CAPTION_SIZE); caption->SetFont(&myfont,B_FONT_SIZE); }
BOOL FreeTypeFontEngine::RemoveThisFont(FreeTypeFontInfo* fontinfo, LOGFONT* lg) { CCriticalSectionLock __lock(CCriticalSectionLock::CS_FONTMAP); { FontMap::const_iterator iter=m_mfontMap.find(myfont(lg->lfFaceName, CalcBoldWeight(lg->lfWeight), lg->lfItalic)); //遍历fontmap if (iter!=m_mfontMap.end()) m_mfontMap.erase(iter); //删除引用 } { FullNameMap::const_iterator iter=m_mfullMap.find(fontinfo->GetFullName()); //遍历fullmap if (iter!=m_mfullMap.end()) m_mfullMap.erase(iter); //删除引用 } delete fontinfo; return true; }