void CSVSortList::initForm() { setStyleClass("t5"); createTitle(); createContent(); createOperate(); }
void PSV_ChartItem::updateItem() { m_curveZValue = 1; // QRectF m_rect = getBoundingRect(); // m_staFont.setPointSizeF(m_rect.height() * 0.008); // m_titleFont.setPointSizeF(m_rect.height() * 0.038); beforeUpdateItem(); if(!m_chartRect.isValid()) { return; } m_staStartPoint = m_chartRect.bottomLeft(); createAxisi(); createTitle(getData(PSV::titleText,"").toString()); if(m_axisParam_left.m_isShow) { m_staStartPoint.setX(m_leftAxisItem->validRect().right()); } if(m_axisParam_down.m_isShow) { m_staStartPoint.setY(m_downAxisItem->validRect().bottom() + getData(PSV::margin,3).toInt()); } createHVLine(); afterUpdateItem(); }
QMSMFormClock::QMSMFormClock(QWidget *pParent, NData::CDataHandler *pDataHandler) : QMSMFormMeasurementAbstract(pParent, pDataHandler), mpCurveClockCpu0(new QwtPlotCurve("Avg. CPU0")), mpCurveClockCpu1(new QwtPlotCurve("Avg. CPU1")), mpCurveClockGpuCore(new QwtPlotCurve("GPU Core")), mpCurveClockGpuMemory(new QwtPlotCurve("GPU Memory")), mpCurveClockMicCore(new QwtPlotCurve("MIC Core")), mpCurveClockMicMemory(new QwtPlotCurve("MIC Memory")) { setWindowTitle(QApplication::translate("FormMeasurement", "Clock", 0, QApplication::UnicodeUTF8)); qwtPlot->setAxisTitle(QwtPlot::yLeft, createTitle(QString::fromUtf8("Frequency [MHz]"))); mpCurveClockCpu0->setPen(mColorCpu); mpCurveClockCpu1->setPen(mColorCpuAlternative); mpCurveClockGpuCore->setPen(mColorGpu); mpCurveClockGpuMemory->setPen(mColorGpuAlternative); mpCurveClockMicCore->setPen(mColorMic); mpCurveClockMicMemory->setPen(mColorMicAlternative); setupCurves(); mpCurveClockCpu0->attach(qwtPlot); mpCurveClockCpu1->attach(qwtPlot); mpCurveClockGpuCore->attach(qwtPlot); mpCurveClockGpuMemory->attach(qwtPlot); mpCurveClockMicCore->attach(qwtPlot); mpCurveClockMicMemory->attach(qwtPlot); qwtPlot->insertLegend(mpLegend, QwtPlot::BottomLegend); }
QMSMFormPower::QMSMFormPower(QWidget *pParent, NData::CDataHandler *pDataHandler) : QMSMFormMeasurementAbstract(pParent, pDataHandler), mpCurvePowerCpu0(new QwtPlotCurve("CPU0")), mpCurvePowerCpu1(new QwtPlotCurve("CPU1")), mpCurvePowerGpu(new QwtPlotCurve("GPU")), mpCurvePowerFpga(new QwtPlotCurve("FPGA")), mpCurvePowerMic(new QwtPlotCurve("MIC")), mpCurvePowerSystem(new QwtPlotCurve("System")) { setWindowTitle(QApplication::translate("FormMeasurement", "Power", 0, QApplication::UnicodeUTF8)); qwtPlot->setAxisTitle(QwtPlot::yLeft, createTitle(QString::fromUtf8("Power [W]"))); mpCurvePowerCpu0->setPen(mColorCpu); mpCurvePowerCpu1->setPen(mColorCpuAlternative); mpCurvePowerGpu->setPen(mColorGpu); mpCurvePowerFpga->setPen(mColorFpga); mpCurvePowerMic->setPen(mColorMic); mpCurvePowerSystem->setPen(mColorSystem); setupCurves(); mpCurvePowerCpu0->attach(qwtPlot); mpCurvePowerCpu1->attach(qwtPlot); mpCurvePowerGpu->attach(qwtPlot); mpCurvePowerFpga->attach(qwtPlot); mpCurvePowerMic->attach(qwtPlot); mpCurvePowerSystem->attach(qwtPlot); qwtPlot->insertLegend(mpLegend, QwtPlot::BottomLegend); }
QMSMFormTemperature::QMSMFormTemperature(QWidget *pParent, NData::CDataHandler *pDataHandler) : QMSMFormMeasurementAbstract(pParent, pDataHandler), mpCurveTempCpu0(new QwtPlotCurve("CPU0")), mpCurveTempCpu1(new QwtPlotCurve("CPU1")), mpCurveTempGpu(new QwtPlotCurve("GPU")), mpCurveTempFpgaM(new QwtPlotCurve("Compute FPGA")), mpCurveTempFpgaI(new QwtPlotCurve("Interface FPGA")), mpCurveTempMic(new QwtPlotCurve("MIC Die")), mpCurveTempSystem(new QwtPlotCurve("Mainboard")) { setWindowTitle(QApplication::translate("FormMeasurement", "Temperature", 0, QApplication::UnicodeUTF8)); qwtPlot->setAxisTitle(QwtPlot::yLeft, createTitle(QString::fromUtf8("Temperature [°C]"))); mpCurveTempCpu0->setPen(mColorCpu); mpCurveTempCpu1->setPen(mColorCpuAlternative); mpCurveTempGpu->setPen(mColorGpu); mpCurveTempFpgaM->setPen(mColorFpga); mpCurveTempFpgaI->setPen(mColorFpgaAlternative); mpCurveTempMic->setPen(mColorMic); mpCurveTempSystem->setPen(mColorSystem); setupCurves(); mpCurveTempCpu0->attach(qwtPlot); mpCurveTempCpu1->attach(qwtPlot); mpCurveTempGpu->attach(qwtPlot); mpCurveTempFpgaM->attach(qwtPlot); mpCurveTempFpgaI->attach(qwtPlot); mpCurveTempMic->attach(qwtPlot); mpCurveTempSystem->attach(qwtPlot); qwtPlot->insertLegend(mpLegend, QwtPlot::BottomLegend); }
Window::Window(QWidget *parent) : QWidget(parent) { // Main layout QVBoxLayout *mainLayout = new QVBoxLayout; // Creates titleGroupBox widget createTitle(); // Creates main text box widget createMainTextBox(); // Creates codec area box createCodecAreaBox(); // Add the widgets to the main layout mainLayout->addWidget(titleGroupBox); mainLayout->addWidget(mainTextBox); mainLayout->addWidget(codecAreaBox); // Sets the margins for main layout mainLayout->setMargin(25); // Sets main layout as the window layout setLayout(mainLayout); // Set the window title setWindowTitle(tr("Scout Talker")); }
void TutorialStateChecklistWizardAbstract::begin () { LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardAbstract::begin ()"; m_title = createTitle ("Checklist Wizard and Checklist Guide"); m_background = createPixmapItem (":/engauge/img/panel_checklist.png", QPoint (0, 30)); m_text0 = createTextItem ("For new Engauge users, a Checklist Wizard\n" "is available when importing an image file.\n" "This wizard produces a helpful checklist of\n" "steps to follow to digitize the image file.", QPoint (260, 30)); m_text1 = createTextItem ("Step 1 - Enable the menu option Help /\n" "Checklist Guide Wizard.", QPoint (285, 125)); m_text2 = createTextItem ("Step 2 - Import the file using File /\n" "Import. The Checklist Wizard will appear\n" "and ask some simple questions to\n" "determine how the image can be\n" "digitized.", QPoint (285, 175)); m_text3 = createTextItem ("Additional options are available in\n" "the various Settings menus.\n\n" "This ends the tutorial. Good luck!", QPoint (285, 270)); QSize backgroundSize = context().tutorialDlg().backgroundSize(); m_previous = new TutorialButton ("Previous", context().tutorialDlg().scene()); m_previous->setGeometry (QPoint (buttonMargin (), backgroundSize.height () - buttonMargin() - m_previous->size().height())); }
void TutorialStateIntroduction::begin () { LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::begin ()"; m_title = createTitle (tr ("Introduction")); m_background = createPixmapItem (":/engauge/img/SpreadsheetsForDoc.png", QPoint (0, 0)); m_text0 = createTextItem (tr ("Engauge Digitizer starts with\n" "images of graphs and maps."), QPoint (200, 40)); m_text1 = createTextItem (tr ("You create (or digitize) points along\n" "the graph and map curves."), QPoint (240, 180)); m_text2 = createTextItem (tr ("The digitized curve points can be\n" "exported, as numbers, to other software tools."), QPoint (210, 330)); QSize backgroundSize = context().tutorialDlg().backgroundSize(); m_next = new TutorialButton (tr ("Next"), context().tutorialDlg().scene()); m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (), backgroundSize.height () - buttonMargin () - m_next->size ().height ())); connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ())); }
QMSMFormMemory::QMSMFormMemory(QWidget *pParent, NData::CDataHandler *pDataHandler) : QMSMFormMeasurementAbstract(pParent, pDataHandler), mpCurveMemoryCpu(new QwtPlotCurve("CPU RAM")), mpCurveSwapCpu(new QwtPlotCurve("CPU SWAP")), mpCurveMemoryGpu(new QwtPlotCurve("GPU")), mpCurveMemoryMic(new QwtPlotCurve("MIC")) { setWindowTitle(QApplication::translate("FormMeasurement", "Memory", 0, QApplication::UnicodeUTF8)); qwtPlot->setAxisTitle(QwtPlot::yLeft, createTitle(QString::fromUtf8("Memory [MiB]"))); mpCurveMemoryCpu->setPen(mColorCpu); mpCurveSwapCpu->setPen(mColorCpuAlternative); mpCurveMemoryGpu->setPen(mColorGpu); mpCurveMemoryMic->setPen(mColorMic); setupCurves(); mpCurveMemoryCpu->attach(qwtPlot); mpCurveSwapCpu->attach(qwtPlot); mpCurveMemoryGpu->attach(qwtPlot); mpCurveMemoryMic->attach(qwtPlot); qwtPlot->insertLegend(mpLegend, QwtPlot::BottomLegend); }
void CreditsScreen::setupCredits() { const int personNum = 4; const int titleNum = 3; CCLabelTTF* title1 = 0; CCLabelTTF* title2 = 0; CCLabelTTF* title3 = 0; CCSprite* person1 = 0; CCSprite* person21 = 0; CCSprite* person22 = 0; CCSprite* person3 = 0; title1 = createTitle("PROGRAMMING"); person1 = createPerson("STANISLAV KOROTAEV", "https://twitter.com/TheBrenor", "https://www.facebook.com/stanislav.korotaev"); title2 = createTitle("MUSIC"); person21 = createPerson("MATTHEW PABLO ", "https://twitter.com/matthewpablo", "https://www.facebook.com/pages/Matthew-Pablo/33998389696"); person22 = createPerson("LANE BECKSTROM", "https://twitter.com/lanebeckstrom", "https://www.facebook.com/lane.beckstrom"); title3 = createTitle("BACKGROUNDS"); person3 = createPerson("RAWDANITSU"); const float totalHeight = title1->getContentSize().height * titleNum + person1->getContentSize().height * personNum + PADDING_AFTER_TITLE * (personNum - 1) + PADDING_AFTER_PERSON * (titleNum - 1); title1->setPositionY(totalHeight / 2 - title1->getContentSize().height / 2); person1->setPositionY(title1->getPositionY() - title1->getContentSize().height - PADDING_AFTER_TITLE); title2->setPositionY(person1->getPositionY() - person1->getContentSize().height - PADDING_AFTER_PERSON); person21->setPositionY(title2->getPositionY() - title2->getContentSize().height - PADDING_AFTER_TITLE); person22->setPositionY(person21->getPositionY() - person21->getContentSize().height - PADDING_AFTER_TITLE); title3->setPositionY(person22->getPositionY() - person22->getContentSize().height - PADDING_AFTER_PERSON); person3->setPositionY(title3->getPositionY() - title3->getContentSize().height - PADDING_AFTER_TITLE); addChild(title1); addChild(title2); addChild(title3); addChild(person1); addChild(person21); addChild(person22); addChild(person3); }
AddCardsCommand::AddCardsCommand(TableModel * model, const QList < Card > &_cards):UndoCommand(model), cards(_cards) { for (int i = 0; i < cards.size(); ++i) rows.push_back(0); createTitle(); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 初始化 ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void CEccBaseTable::initForm(bool bHasHelp) { // 创建标题 createTitle(bHasHelp); // 创建内容 createContent(); // 创建操作 createOperate(); }
void TutorialStateCurveSelection::begin () { LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateCurveSelection::begin ()"; m_title = createTitle ("Curve Selection"); m_background = createPixmapItem (":/engauge/img/panel_curve_selection.png", QPoint (0, 30)); m_text0 = createTextItem ("After the axis points have been created, a\n" "curve is selected to receive curve points.\n" "Step 1 - click on Curve, Point Match, Color\n" "Picker or Segment Fill buttons.", QPoint (250, 40)); m_text1 = createTextItem ("Step 2 - Select the desired curve name. If\n" "that curve name has not been created yet,\n" "use the menu option Settings / Curve Names\n" "to create it.", QPoint (250, 120)); m_text2 = createTextItem ("Step 3 - Change the background from the\n" "original image to the filtered image\n" "produced for the current curve, using the\n" "menu option View / Background / Filtered\n" "Image. This filtering enables the powerful\n" "automated algorithms discussed later in\n" "the tutorial.", QPoint (250, 200)); m_text3 = createTextItem ("If the current curve is no longer visible\n" "in the filtered image, then change the\n" "current Color Filter settings. In the figure,\n" "the orange points have disappeared.", QPoint (250, 330)); QSize backgroundSize = context().tutorialDlg().backgroundSize(); m_previous = new TutorialButton ("Previous", context().tutorialDlg().scene()); m_previous->setGeometry (QPoint (buttonMargin (), backgroundSize.height() - buttonMargin() - m_previous->size().height())); connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ())); m_colorFilter = new TutorialButton ("Color Filter Settings", context().tutorialDlg().scene()); m_colorFilter->setGeometry (QPoint (backgroundSize.width () / 2.0 - m_colorFilter->size ().width () / 2, backgroundSize.height () - buttonMargin () - m_colorFilter->size ().height ())); connect (m_colorFilter, SIGNAL (signalTriggered ()), this, SLOT (slotColorFilter ())); m_next = new TutorialButton ("Next", context().tutorialDlg().scene()); m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (), backgroundSize.height () - buttonMargin () - m_next->size ().height ())); connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ())); }
void PSV_ChartItem::setTitleColor(const QColor &color) { // m_titleColor = color; d->setData(PSV::titleColor,color); if(m_titleItem == NULL) { createTitle(getData(PSV::titleText,"").toString()); } else { m_titleItem->setDefaultTextColor(color); adjustTitlePos(); } }
void PSV_ChartItem::setTitleText(const QString &text) { // m_titleText = text; d->setData(PSV::titleText,text); if(m_titleItem == NULL) { createTitle(text); } else { m_titleItem->setPlainText(text); adjustTitlePos(); } }
void SVDependTable::initForm() { createTitle(); int nRow = numRows(); m_pSub = new WTable(elementAt(nRow, 0)); if(m_pSub) { m_pSub->setStyleClass("t3"); createDesc(); createDependList(); createCondition(); } createHideEdit(); }
void PSV_ChartItem::setTitleFont(const QFont &font) { // m_titleFont = font; d->setData(PSV::titleFont,font); QString titleText = getData(PSV::titleText,"").toString(); if(m_titleItem == NULL) { createTitle(titleText); } else { m_titleItem->setFont(titleText); adjustTitlePos(); } }
bool AddCardsCommand::mergeWith(const QUndoCommand * command) { if (command->id() != id()) return false; if (dynamic_cast < const UndoCommand * >(command) == NULL) return false; const AddCardsCommand *c = dynamic_cast < const AddCardsCommand * >(command); if (c->model != model) return false; cards.append(c->cards); rows.append(c->rows); createTitle(); return true; }
void toResultItem::addItem(const QString &title, const QString &value) { if (WidgetPos >= NumWidgets) { NumWidgets += ALLOC_SIZE; Widgets.resize(NumWidgets, 0); } QString t; if (title != "-") t = Utils::toTranslateMayby(sqlName(), title); QWidget *widget; if (!Widgets[WidgetPos]) { widget = createTitle(this); Widgets[WidgetPos] = widget; } else widget = ((QLabel *)Widgets[WidgetPos]); setTitle(widget, t, value); if (ShowTitle) widget->show(); else widget->hide(); WidgetPos++; if (!Widgets[WidgetPos]) { widget = createValue(this); Widgets[WidgetPos] = widget; } else widget = Widgets[WidgetPos]; setValue(widget, title, value); widget->show(); WidgetPos++; }
void TutorialStateColorFilter::begin () { LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateColorFilter::begin ()"; m_title = createTitle (tr ("Color Filter")); m_background = createPixmapItem (":/engauge/img/panel_color_filter.png", QPoint (0, 30)); m_text0 = createTextItem (tr ("Each curve has Color Filter settings that\n" "are applied in Segment Fill mode. For\n" "black lines the defaults work well, but for\n" "colored lines the settings can be improved."), QPoint (260, 30)); m_text1 = createTextItem (tr ("Step 1 - Select the Settings / Color\n" "Filter menu option."), QPoint (285, 115)); m_text2 = createTextItem (tr ("Step 2 - Select the curve that will\n" "be given the new settings."), QPoint (285, 165)); m_text3 = createTextItem (tr ("Step 3 - Select the mode. Intensity is\n" "suggested for uncolored lines, and Hue\n" "is suggested for colored lines."), QPoint (285, 210)); m_text4 = createTextItem (tr ("Step 4 - Adjust the included range by\n" "dragging the green handles, until the\n" "curve is clear in the preview window\n" "below. The graph shows a histogram\n" "distribution of the values underneath.\n" "Click Ok when finished."), QPoint (285, 280)); QSize backgroundSize = context().tutorialDlg().backgroundSize(); m_back = new TutorialButton (tr ("Back"), context().tutorialDlg().scene()); m_back->setGeometry (QPoint (backgroundSize.width () / 2 - m_back->size().width () / 2, backgroundSize.height() - buttonMargin() - m_back->size().height())); connect (m_back, SIGNAL (signalTriggered ()), this, SLOT (slotBack ())); }
void TutorialStateAxisPoints::begin () { LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateAxisPoints::begin ()"; m_title = createTitle (tr ("Axis Points")); m_background = createPixmapItem (":/engauge/img/panel_axis_points.png", QPoint (0, 30)); m_text0 = createTextItem (tr ("Axis points are first defined to\n" "define the coordinates. Step 1 -\n" "Click on the Axis Points button"), QPoint (320, 60)); m_text1 = createTextItem (tr ("Step 2 - Click on an axis or grid\n" "line with known coordinates. An axis\n" "point appears, with a dialog window\n" "for entering the axis point's\n" "coordinates"), QPoint (300, 210)); m_text2 = createTextItem (tr ("Step 3 - Enter the two coordinates\n" "of the axis point and then click Ok.\n" "Repeat steps 2 and 3 twice more\n" "until three axis points are created"), QPoint (280, 320)); QSize backgroundSize = context().tutorialDlg().backgroundSize(); m_previous = new TutorialButton (tr ("Previous"), context().tutorialDlg().scene()); m_previous->setGeometry (QPoint (buttonMargin (), backgroundSize.height() - buttonMargin() - m_previous->size().height())); connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ())); m_next = new TutorialButton (tr ("Next"), context().tutorialDlg().scene()); m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (), backgroundSize.height () - buttonMargin () - m_next->size ().height ())); connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ())); }
void MenuFactory::createTitle( const QString title ) { createTitle( m_menu, title ); }
void SVSEView::initForm() { createTitle(); createSEList(); enumSVSE(); }
bool PSV_ChartItem::adjusetMargin() { // qreal m_margin = getData(PSV::margin).toDouble(); // PSV_Public::printMes(m_margin,"margin"); int m_margin = getData(PSV::margin,3).toInt(); qreal margin_up = m_margin_up+m_margin; qreal margin_down = m_margin_down+m_margin; qreal margin_left = m_margin_left+m_margin; qreal margin_right = m_margin_right+m_margin; if(m_axisParam_left.m_isShow) { createLeftAxisi(m_axisParam_left); margin_left += m_leftAxisItem->validRect().width(); } if(m_axisParam_right.m_isShow) { createRightAxisi(m_axisParam_right); margin_right += m_rightAxisItem->validRect().width(); } if(m_axisParam_up.m_isShow) { createUpAxisi(m_axisParam_up); margin_up += m_upAxisItem->validRect().height(); } if(m_axisParam_down.m_isShow) { createDownAxisi(m_axisParam_down); margin_down += m_downAxisItem->validRect().height(); } QString m_titleText = getData(PSV::titleText,"").toString(); if(!m_titleText.isEmpty()) { createTitle(m_titleText); margin_up += m_titleItem->boundingRect().height(); } if(!isStaHidden() && m_curveDataMap.count() > 0) { qreal height_max = 0; qreal width_max = 0; QGraphicsTextItem *textItem = new QGraphicsTextItem(this); textItem->setDefaultTextColor(getDefaultColor()); textItem->setFont(staFont()); QMapIterator<QString,PSV_CurveInfo> iter(m_curveDataMap); while(iter.hasNext()) { iter.next(); PSV_CurveInfo curveInfo = iter.value(); textItem->setHtml(curveInfo.m_staHtmText); qreal tempWidth = textItem->boundingRect().width(); qreal tempHeight = textItem->boundingRect().height(); if(width_max < tempWidth) { width_max = tempWidth; } if(height_max < tempHeight) { height_max = tempHeight; } } width_max += height_max; height_max += getData(PSV::margin,3).toInt(); qreal width = getBoundingRect().width() - margin_left - margin_right; if(width_max >= width) { margin_down += m_curveDataMap.count() * height_max; } else { int count_row = (int)(width / width_max); int dataCount = m_curveDataMap.count(); if(dataCount % count_row != 0) { dataCount += count_row; } int count = dataCount / count_row; margin_down += count * height_max; } m_staMaxWidth = width_max; } m_margin_total_up = margin_up; m_margin_total_down = margin_down; m_margin_total_left = margin_left; m_margin_total_right = margin_right; updateChartRect(); return clearAll(); }