• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ createLabel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中createLabel函数的典型用法代码示例。如果您正苦于以下问题:C++ createLabel函数的具体用法?C++ createLabel怎么用?C++ createLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了createLabel函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: previous

SaveScreen::SaveScreen(Screen *previous) : previous(previous) {
	Label *label;

	/* Create the main work/text area */
	mainLayout = createMainLayout("", LANG_BACK);
	listBox = (TouchListBox*) mainLayout->getChildren()[FIRSTCHILD];

	/* Create the different label/input fields */

	/* ---------------------------------- */
	label = createLabel(LANG_SAVE_TRUCK, FONTHEIGHT);
	checkBox.add(new CheckBox(scrWidth - 50, 2, 16, 16, label));
	checkBox[0]->setResources(RES_CHECKBOX_UNCHECKED, RES_CHECKBOX_CHECKED);
	listBox->add(label);

	/* ---------------------------------- */
	label = createLabel(LANG_SAVE_TRAILER, FONTHEIGHT);
	checkBox.add(new CheckBox(scrWidth - 50, 2, 16, 16, label));
	checkBox[1]->setResources(RES_CHECKBOX_UNCHECKED, RES_CHECKBOX_CHECKED);
	listBox->add(label);

	/* ---------------------------------- */
	listBox->setWrapping(WRAPPING);

	this->setMain(mainLayout);
}
开发者ID:FransUrbo,项目名称:LastBerakning,代码行数:26,代码来源:SaveScreen.cpp


示例2: createReverb

 QWidget* createReverb(QGroupBox* parent) {
     parent->setObjectName("reverb");
     parent->setCheckable(true);
     connectBox(p_reverb_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_reverb_predelay), 0, 0);
     grid->addWidget(createDial(p_reverb_decay), 0, 1);
     grid->addWidget(createDial(p_reverb_lowcut), 0, 2);
     grid->addWidget(createDial(p_reverb_highcut), 0, 3);
     grid->addWidget(createDial(p_reverb_depth), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Predelay"), 1, 0);
     grid->addWidget(new QLabel("Decay"), 1, 1);
     grid->addWidget(new QLabel("Lowcut"), 1, 2);
     grid->addWidget(new QLabel("Highcut"), 1, 3);
     grid->addWidget(new QLabel("Depth"), 1, 4);
     // row 4
     grid->addWidget(createLabel(p_reverb_predelay), 2, 0);
     grid->addWidget(createLabel(p_reverb_decay), 2, 1);
     grid->addWidget(createLabel(p_reverb_lowcut), 2, 2);
     grid->addWidget(createLabel(p_reverb_highcut), 2, 3);
     grid->addWidget(createLabel(p_reverb_depth), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
开发者ID:OpenDAWN,项目名称:rogue,代码行数:28,代码来源:rogue-gui.cpp


示例3: createLfo

 QWidget* createLfo(QGroupBox* parent, uint i) {
     uint off = i * LFO_OFF;
     parent->setCheckable(true);
     connectBox(p_lfo1_on + off, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     QComboBox* typeBox = createSelect(p_lfo1_type + off, lfo_types, 6);
     lfoMapper.setMapping(typeBox, i);
     connect(typeBox, SIGNAL(currentIndexChanged(int)), &lfoMapper, SLOT(map()));
     grid->addWidget(typeBox, 0, 0, 1, 2);
     grid->addWidget(createSelect(p_lfo1_reset_type + off, lfo_reset_types, 3), 0, 2, 1, 2);
     grid->addWidget(connectToLfo(createToggle(p_lfo1_inv + off, "Inv"), i), 0, 4);
     // row 2-4
     grid->addWidget(lfo_wd[i] = new WaveDisplay(LFO_WIDTH, WAVE_HEIGHT), 1, 0, 3, 3);
     // row 5
     grid->addWidget(createDial(p_lfo1_freq + off), 4, 0);
     grid->addWidget(connectToLfo(createDial(p_lfo1_start + off), i), 4, 1);
     grid->addWidget(connectToLfo(createDial(p_lfo1_width + off), i), 4, 2);
     grid->addWidget(createDial(p_lfo1_humanize + off), 4, 3);
     // row 6
     grid->addWidget(new QLabel("Freq"), 5, 0);
     grid->addWidget(new QLabel("Start"), 5, 1);
     grid->addWidget(new QLabel("Width"), 5, 2);
     grid->addWidget(new QLabel("Rand"), 5, 3);
     // row 7
     grid->addWidget(createLabel(p_lfo1_freq + off), 6, 0);
     grid->addWidget(createLabel(p_lfo1_start + off), 6, 1);
     grid->addWidget(createLabel(p_lfo1_width + off), 6, 2);
     grid->addWidget(createLabel(p_lfo1_humanize + off), 6, 3);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     grid->setRowStretch(7, 1);
     return parent;
 }
开发者ID:OpenDAWN,项目名称:rogue,代码行数:35,代码来源:rogue-gui.cpp


示例4: createLabel

//! [0]
Window::Window()
{
    aliasedLabel = createLabel(tr("Aliased"));
    antialiasedLabel = createLabel(tr("Antialiased"));
    intLabel = createLabel(tr("Int"));
    floatLabel = createLabel(tr("Float"));

    QGridLayout *layout = new QGridLayout;
    layout->addWidget(aliasedLabel, 0, 1);
    layout->addWidget(antialiasedLabel, 0, 2);
    layout->addWidget(intLabel, 1, 0);
    layout->addWidget(floatLabel, 2, 0);
//! [0]

//! [1]
    QTimer *timer = new QTimer(this);

    for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 2; ++j) {
            circleWidgets[i][j] = new CircleWidget;
            circleWidgets[i][j]->setAntialiased(j != 0);
            circleWidgets[i][j]->setFloatBased(i != 0);

            connect(timer, SIGNAL(timeout()),
                    circleWidgets[i][j], SLOT(nextAnimationFrame()));

            layout->addWidget(circleWidgets[i][j], i + 1, j + 1);
        }
    }
//! [1] //! [2]
    timer->start(100);
    setLayout(layout);

    setWindowTitle(tr("Concentric Circles"));
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:36,代码来源:window.cpp


示例5: createChorus

 QWidget* createChorus(QGroupBox* parent) {
     parent->setObjectName("chorus");
     parent->setCheckable(true);
     connectBox(p_chorus_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_chorus_delay), 0, 0);
     grid->addWidget(createDial(p_chorus_amount), 0, 1);
     grid->addWidget(createDial(p_chorus_rate), 0, 2);
     grid->addWidget(createDial(p_chorus_depth), 0, 3);
     grid->addWidget(createDial(p_chorus_feedback), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Delay"), 1, 0);
     grid->addWidget(new QLabel("Mod amt"), 1, 1);
     grid->addWidget(new QLabel("Mod frq"), 1, 2);
     grid->addWidget(new QLabel("Depth"), 1, 3);
     grid->addWidget(new QLabel("Feedb"), 1, 4);
     // row 3
     grid->addWidget(createLabel(p_chorus_delay), 2, 0);
     grid->addWidget(createLabel(p_chorus_amount), 2, 1);
     grid->addWidget(createLabel(p_chorus_rate), 2, 2);
     grid->addWidget(createLabel(p_chorus_depth), 2,3);
     grid->addWidget(createLabel(p_chorus_feedback), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
开发者ID:OpenDAWN,项目名称:rogue,代码行数:28,代码来源:rogue-gui.cpp


示例6: ValueLineEdit

void SceneMaterialHeatDialog::createContent()
{
    txtThermalConductivity = new ValueLineEdit(this);
    txtThermalConductivity->setMinimumSharp(0.0);
    txtVolumeHeat = new ValueLineEdit(this, true);
    txtDensity = new ValueLineEdit(this);
    txtDensity->setEnabled(Util::scene()->problemInfo()->analysisType == AnalysisType_Transient);
    txtSpecificHeat = new ValueLineEdit(this);
    txtSpecificHeat->setEnabled(Util::scene()->problemInfo()->analysisType == AnalysisType_Transient);

    connect(txtThermalConductivity, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));
    connect(txtDensity, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));
    connect(txtSpecificHeat, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));

    layout->addWidget(createLabel(tr("<i>%1</i> (W/m·K)").arg(QString::fromUtf8("λ")),
                                  tr("Thermal conductivity")), 10, 0);
    layout->addWidget(txtThermalConductivity, 10, 2);
    layout->addWidget(createLabel(tr("<i>Q</i> (W/m<sup>3</sup>)"),
                                  tr("Volume heat")), 11, 0);
    layout->addWidget(txtVolumeHeat, 11, 2);
    layout->addWidget(createLabel(tr("<i>%1</i> (kg/m<sup>3</sup>)").arg(QString::fromUtf8("ρ")),
                                  tr("Mass density")), 12, 0);
    layout->addWidget(txtDensity, 12, 2);
    layout->addWidget(createLabel(tr("<i>c</i><sub>p</sub> (J/kg·K)"),
                                  tr("Specific heat")), 13, 0);
    layout->addWidget(txtSpecificHeat, 13, 2);
}
开发者ID:honzakac,项目名称:agros2d,代码行数:27,代码来源:hermes_heat.cpp


示例7: shortCircuit

void shortCircuit(compTree* ast, char* lTrue, char* lFalse)
{
	if(ast == NULL)
		return;
	nodeList* auxNodeList;
	char labelTemp[100];
	auxNodeList = ast->childNodeList;
	switch(ast->nodeType)
	{
		case AST_IF_ELSE:
		case AST_WHILE_DO:
		case AST_DO_WHILE:
			strcpy(ast->labelTrue,createLabel());
			strcpy(ast->labelFalse,createLabel());
			break;
		case AST_LOGICO_E:
			strcpy(labelTemp,createLabel());
			strcpy(ast->labelTrue,labelTemp);
			strcpy(ast->labelFalse,lFalse);
			break;
		case AST_LOGICO_OU:
			strcpy(labelTemp,createLabel());
			strcpy(ast->labelFalse,labelTemp);
			strcpy(ast->labelTrue,lTrue);
			break;
	}
	while(auxNodeList != NULL)
	{
		shortCircuit(auxNodeList->firstNode,ast->labelTrue,ast->labelFalse);
		auxNodeList = auxNodeList->nextNode;
	}
}
开发者ID:Mandiow,项目名称:MonT,代码行数:32,代码来源:cc_iloc.c


示例8: QComboBox

void SceneBoundaryHeatDialog::createContent()
{
    cmbType = new QComboBox(this);
    cmbType->addItem(physicFieldBCString(PhysicFieldBC_Heat_Temperature), PhysicFieldBC_Heat_Temperature);
    cmbType->addItem(physicFieldBCString(PhysicFieldBC_Heat_Flux), PhysicFieldBC_Heat_Flux);
    connect(cmbType, SIGNAL(currentIndexChanged(int)), this, SLOT(doTypeChanged(int)));

    txtHeatFlux = new ValueLineEdit(this);
    txtTemperature = new ValueLineEdit(this);
    txtHeatTransferCoefficient = new ValueLineEdit(this);
    txtExternalTemperature = new ValueLineEdit(this);

    connect(txtHeatFlux, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));
    connect(txtTemperature, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));
    connect(txtHeatTransferCoefficient, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));
    connect(txtExternalTemperature, SIGNAL(evaluated(bool)), this, SLOT(evaluated(bool)));

    // set active marker
    doTypeChanged(cmbType->currentIndex());
    layout->addWidget(new QLabel(tr("BC type:")), 4, 0);
    layout->addWidget(cmbType, 4, 2);
    layout->addWidget(createLabel(tr("<i>T</i><sub>0</sub> (K)"),
                                  tr("Temperature")), 11, 0);
    layout->addWidget(txtTemperature, 11, 2);
    layout->addWidget(createLabel(tr("<i>f</i><sub>0</sub> (W/m<sup>2</sup>)"),
                                  tr("Heat flux")), 12, 0);
    layout->addWidget(txtHeatFlux, 12, 2);
    layout->addWidget(createLabel(tr("<i>%1</i> (W/m<sup>2</sup>·K)").arg(QString::fromUtf8("α")),
                                  tr("Heat transfer coef.")), 13, 0);
    layout->addWidget(txtHeatTransferCoefficient, 13, 2);
    layout->addWidget(createLabel(tr("<i>T</i><sub>ext</sub> (K)"),
                                  tr("External temperature")), 14, 0);
    layout->addWidget(txtExternalTemperature, 14, 2);

}
开发者ID:honzakac,项目名称:agros2d,代码行数:35,代码来源:hermes_heat.cpp


示例9: getControls

QuickKeysMenu::QuickKeysMenu()
{
  // add controls
  std::vector<HUDuiControl*>& controls = getControls();

  controls.push_back(createLabel("Define Quick Keys"));
  controls.push_back(createLabel("Notice: depending on platform not all keys might work"));

  controls.push_back(createLabel("Send to All"));
  controls.push_back(createLabel("Send to Team"));

  firstKeyControl = controls.size();

  int i;
  for (i=1; i < 11; i++) {
    std::string keyLabel = string_util::format("Alt-F%d", i);
    controls.push_back(createInput(keyLabel));
  }

  for (i=1; i < 11; i++) {
    std::string keyLabel = string_util::format("Ctrl-F%d", i);
    controls.push_back(createInput(keyLabel));
  }

  initNavigation(controls, firstKeyControl, controls.size()-1);
}
开发者ID:mvanderkolff,项目名称:navi-misc,代码行数:26,代码来源:QuickKeysMenu.cpp


示例10: createMain

    QWidget* createMain(QWidget* parent) {
        parent->setObjectName("main");
        QGridLayout* grid = new QGridLayout(parent);
        // row 1
        grid->addWidget(createDial(p_volume), 0, 0);
        grid->addWidget(createSelect(p_play_mode, modes, 3), 0, 1);
        grid->addWidget(createDial(p_glide_time), 0, 2);
        grid->addWidget(createDial(p_pitchbend_range), 0, 3);
        // row 2
        grid->addWidget(new QLabel("Vol"),  1, 0);
        grid->addWidget(new QLabel("Mode"), 1, 1);
        grid->addWidget(new QLabel("Glide t."), 1, 2);
        grid->addWidget(new QLabel("Bend r."), 1, 3);
        // row 3
        grid->addWidget(createLabel(p_volume), 2, 0);
        // skip
        grid->addWidget(createLabel(p_glide_time), 2, 2);
        grid->addWidget(createLabel(p_pitchbend_range), 2, 3);

        grid->setHorizontalSpacing(2);
        grid->setVerticalSpacing(0);
        grid->setColumnStretch(4, 1);
        grid->setRowStretch(3, 1);
        return parent;
    }
开发者ID:OpenDAWN,项目名称:rogue,代码行数:25,代码来源:rogue-gui.cpp


示例11: createPhaser

 QWidget* createPhaser(QGroupBox* parent) {
     parent->setObjectName("phaser");
     parent->setCheckable(true);
     connectBox(p_phaser_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_phaser_min_freq), 0, 0);
     grid->addWidget(createDial(p_phaser_max_freq), 0, 1);
     grid->addWidget(createDial(p_phaser_rate), 0, 2);
     grid->addWidget(createDial(p_phaser_depth), 0, 3);
     grid->addWidget(createDial(p_phaser_feedback), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Min Fr"), 1, 0);
     grid->addWidget(new QLabel("Max Fr"), 1, 1);
     grid->addWidget(new QLabel("Mod frq"), 1, 2);
     grid->addWidget(new QLabel("Depth"), 1, 3);
     grid->addWidget(new QLabel("Feedb"), 1, 4);
     // row 3
     grid->addWidget(createLabel(p_phaser_min_freq), 2, 0);
     grid->addWidget(createLabel(p_phaser_max_freq), 2, 1);
     grid->addWidget(createLabel(p_phaser_rate), 2, 2);
     grid->addWidget(createLabel(p_phaser_depth), 2, 3);
     grid->addWidget(createLabel(p_phaser_feedback), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
开发者ID:OpenDAWN,项目名称:rogue,代码行数:28,代码来源:rogue-gui.cpp


示例12: QLCDNumber

//! [0]
TetrixWindow::TetrixWindow()
{
    board = new TetrixBoard;
//! [0]

    nextPieceLabel = new QLabel;
    nextPieceLabel->setFrameStyle(QFrame::Box | QFrame::Raised);
    nextPieceLabel->setAlignment(Qt::AlignCenter);
    board->setNextPieceLabel(nextPieceLabel);

//! [1]
    scoreLcd = new QLCDNumber(5);
    scoreLcd->setSegmentStyle(QLCDNumber::Filled);
//! [1]
    levelLcd = new QLCDNumber(2);
    levelLcd->setSegmentStyle(QLCDNumber::Filled);
    linesLcd = new QLCDNumber(5);
    linesLcd->setSegmentStyle(QLCDNumber::Filled);

//! [2]
    startButton = new QPushButton(tr("&Start"));
    startButton->setFocusPolicy(Qt::NoFocus);
    quitButton = new QPushButton(tr("&Quit"));
    quitButton->setFocusPolicy(Qt::NoFocus);
    pauseButton = new QPushButton(tr("&Pause"));
//! [2] //! [3]
    pauseButton->setFocusPolicy(Qt::NoFocus);
//! [3] //! [4]

    connect(startButton, SIGNAL(clicked()), board, SLOT(start()));
//! [4] //! [5]
    connect(quitButton , SIGNAL(clicked()), qApp, SLOT(quit()));
    connect(pauseButton, SIGNAL(clicked()), board, SLOT(pause()));
    connect(board, SIGNAL(scoreChanged(int)), scoreLcd, SLOT(display(int)));
    connect(board, SIGNAL(levelChanged(int)), levelLcd, SLOT(display(int)));
    connect(board, SIGNAL(linesRemovedChanged(int)),
            linesLcd, SLOT(display(int)));
//! [5]

//! [6]
    QGridLayout *layout = new QGridLayout;
    layout->addWidget(createLabel(tr("NEXT")), 0, 0);
    layout->addWidget(nextPieceLabel, 1, 0);
    layout->addWidget(createLabel(tr("LEVEL")), 2, 0);
    layout->addWidget(levelLcd, 3, 0);
    layout->addWidget(startButton, 4, 0);
    layout->addWidget(board, 0, 1, 6, 1);
    layout->addWidget(createLabel(tr("SCORE")), 0, 2);
    layout->addWidget(scoreLcd, 1, 2);
    layout->addWidget(createLabel(tr("LINES REMOVED")), 2, 2);
    layout->addWidget(linesLcd, 3, 2);
    layout->addWidget(quitButton, 4, 2);
    layout->addWidget(pauseButton, 5, 2);
    setLayout(layout);

    setWindowTitle(tr("Tetrix"));
    resize(550, 370);
}
开发者ID:elProxy,项目名称:qtbase,代码行数:59,代码来源:tetrixwindow.cpp


示例13: initializeChooseWorldWindow

Widget* initializeChooseWorldWindow(SDL_Surface* windowSurface) {
	Widget* window = createWindow(windowSurface);
	char stringBuffer[SELECT_WORLD_STRING_LENGTH];
	char digitBuffer[2];
	strcpy(stringBuffer, SELECT_WORLD_COOSE_TEXT);

	SDL_Rect panelRect = { 300, 150, 400, 600 };
	Widget* panel = createPanel(windowSurface, panelRect, SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B));
	addChild(window, panel);

	SDL_Rect labelRect = { 35, 20, 20, 20 };

	Widget* label;
	if (currSelectionWindow == LOAD) {
		label = createLabel(labelRect, LOAD_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
	}
	else if (currSelectionWindow == EDIT) {
		label = createLabel(labelRect, EDIT_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
	}
	else {
		label = createLabel(labelRect, SAVE_GAME_TITLE, window->image, 0, 0, bitmapfont1, NULL);
	}
	addChild(panel, label);

	SDL_Rect buttonSelectRect = { 20, 60, 20, 20 };
	SDL_Rect buttonDoneRect = { 20, 130, 20, 20 };
	SDL_Rect buttonBackRect = { 20, 200, 20, 20 };
	SDL_Rect buttonUpRect = { 186, 60, 20, 20 };
	SDL_Rect buttonDownRect = { 186, 84, 20, 20 };


	sprintf(digitBuffer, "%d", currWorld);
	strcat(stringBuffer, digitBuffer);

	Widget* buttonSelect = createButton(buttonSelectRect, stringBuffer, window->image, MARKED, "select_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 25, 10, BUTTON_SELECT_WORLD, bitmapfont1);
	addChild(panel, buttonSelect);

	Widget* buttonDone = createButton(buttonDoneRect, SELECT_WORLD_DONE_TEXT, window->image, REGULAR, "button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 25, 10, BUTTON_SELECT_WORLD_DONE, bitmapfont1);
	addChild(panel, buttonDone);

	Widget* buttonBack = createButton(buttonBackRect, SELECT_WORLD_BACK_TEXT, window->image, REGULAR, "button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_BACK, bitmapfont1);
	addChild(panel, buttonBack);

	Widget* buttonUp = createButton(buttonUpRect, NULL, window->image, REGULAR, "up_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_INCREASE, bitmapfont1);
	addChild(panel, buttonUp);

	Widget* buttonDown = createButton(buttonDownRect, NULL, window->image, REGULAR, "down_button.bmp", SDL_MapRGB(pixel_format, COLOR_R, COLOR_G, COLOR_B), 20, 10, BUTTON_SELECT_WORLD_DECREASE, bitmapfont1);
	addChild(panel, buttonDown);

	return window;
}
开发者ID:ilayluz,项目名称:SoftwareProject,代码行数:51,代码来源:SelectWorld.c


示例14: setLayout

Window::Window()
{
    QTextBrowser *centralWidget = new QTextBrowser;
    centralWidget->setPlainText(tr("Central widget"));

    BorderLayout *layout = new BorderLayout;
    layout->addWidget(centralWidget, BorderLayout::Center);
    layout->addWidget(createLabel("North"), BorderLayout::North);
    layout->addWidget(createLabel("West"), BorderLayout::West);
    layout->addWidget(createLabel("East 1"), BorderLayout::East);
    layout->addWidget(createLabel("East 2") , BorderLayout::East);
    layout->addWidget(createLabel("South"), BorderLayout::South);
    setLayout(layout);

    setWindowTitle(tr("Border Layout"));
}
开发者ID:Andreas665,项目名称:qt,代码行数:16,代码来源:window.cpp


示例15: condition

ident_t condition(){
    ident_t tmp1, tmp2 = 0, lab;
    symtype_t op = UNEQU;
    opcode_t opcode = NOP;
    vartype_t type = TCHAR;
    tmp1 = expression();
    if(tmp1->subtype>type)type=tmp1->subtype;
    if(isEqualOperator(sym)){
        op = sym->type;
        nextSym();
        tmp2 = expression();
        if(tmp2->subtype>type)type=tmp2->subtype;
    }
    if(type==TFLOAT){
        gen(FCMP, tmp1, tmp2, 0);
    }else{
        gen(CMP, tmp1, tmp2, 0);
    }
    lab = createLabel();
    if(op==LESS){
        opcode = JGE;
    }else if(op==LEQU){
        opcode = JGT;
    }else if(op==GREATER){
        opcode = JLE;
    }else if(op==GEQU){
        opcode = JLT;
    }else if(op==UNEQU){
        opcode = JEQ;
    }else if(op==EQU){
        opcode = JNE;
    }
    gen(opcode, lab, 0, 0);
    return lab;
}
开发者ID:shenchi,项目名称:mycc,代码行数:35,代码来源:parser.c


示例16: createLabel

string X86::addGlobalLiteral(string str) {
  stringstream s;
  string lb = createLabel(false, "str");
  s << lb << " db '" << toNasmString(str) << "',0";
  writeDATA(s.str());
  return lb;
}
开发者ID:BackupTheBerlios,项目名称:gpt-svn,代码行数:7,代码来源:X86.cpp


示例17: log

void FontTest::setUp()
{
	log("TDD Setup is called");
	
	
	std::vector<std::string> fontList;
	
	// note: name of the font can be found here:
	// http://iosfonts.com/
	fontList.push_back("Arial");
	fontList.push_back("GillSans");
	fontList.push_back("Helvetica");
	fontList.push_back("AmericanTypewriter");
	fontList.push_back("Arial-BoldMT");
	fontList.push_back("Chalkduster");
	fontList.push_back("Courier");
	fontList.push_back("Papyrus");
	fontList.push_back("TimesNewRomanPSMT");
	
	Size size = TDDHelper::getScreenSize();
	
	Point pos = Point(size.width/2, 100);
	for(int i=0; i<fontList.size(); i++) {
		std::string name = fontList[i];
		
		Label *label = createLabel(name, name, 20);
		label->setPosition(pos);
		addChild(label);
		
		pos.y += 30;
	}
}
开发者ID:duongbadu,项目名称:TicTacToeCcx3,代码行数:32,代码来源:FontTest.cpp


示例18: Layout

void browserView::showApplications(application *applications, int count) {

	int height = 30;
	Layout * softkey_layout = new Layout (0, scrHeight, scrWidth, height, NULL, 2, 1);
	Label  * softLeft  		= new Label  (0, 0, scrWidth / 2, height, softkey_layout);
	softLeft->setCaption ("select");

	if (count == 0) {
		createInfoLabel ("", "No apps in this category", list_box);
		this->currentScreen = BROWSER_VIEW;
		softLeft->setCaption ("");
	}

	softLeft->setBackgroundColor (0);
	softLeft->setHorizontalAlignment (Label::HA_LEFT);
	setLabelPadding (softLeft);

	Label * softRight = new Label (0, 0, scrWidth/2, height, softkey_layout);
	softRight->setCaption ("back");
	softRight->setBackgroundColor (0);
	softRight->setHorizontalAlignment (Label::HA_RIGHT);
	setLabelPadding (softRight);

	this->getMain ()->add (softkey_layout);

	int i;
	for(i = 0; i < count; i++){
		//printf("%s\n", applications[i].name);
		createLabel (applications [i].name, list_box);
	}
}
开发者ID:Najoj,项目名称:freasy,代码行数:31,代码来源:browserView.cpp


示例19: createLabel

bool ZodiakPlugin::eventFilter(QObject *o, QEvent *e)
{
    if (e->type() == QEvent::ChildInserted){
        QChildEvent *ce = (QChildEvent*)e;
        if (ce->child()->inherits("DatePicker")){
            DatePicker *picker = (DatePicker*)(ce->child());
            list<Picker>::iterator it;
            for (it = m_pickers.begin(); it != m_pickers.end(); ++it){
                if ((*it).picker == picker)
                    break;
            }
            if (it == m_pickers.end())
                createLabel(picker);
        }
    }
    if (e->type() == QEvent::ChildRemoved){
        QChildEvent *ce = (QChildEvent*)e;
        if (ce->child()->inherits("DatePicker")){
            DatePicker *picker = (DatePicker*)(ce->child());
            for (list<Picker>::iterator it = m_pickers.begin(); it != m_pickers.end(); ++it){
                if ((*it).picker == picker){
                    m_pickers.erase(it);
                    break;
                }
            }
        }
    }
    return QObject::eventFilter(o, e);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:29,代码来源:zodiak.cpp


示例20: while

Data::Node::Node(qlonglong id, QString name, Data::Type* type, float scaling, Data::Graph* graph, osg::Vec3f position) 
{
	//konstruktor
	//scaling je potrebne na zmensenie uzla ak je vnoreny
    this->id = id;
	this->name = name;
	this->type = type;
    this->mIsFocused = false;
    this->mTargetPosition = position;
	this->currentPosition = position * Util::ApplicationConfig::get()->getValue("Viewer.Display.NodeDistanceScale").toFloat();
	this->graph = graph;
	this->inDB = false;
	this->edges = new QMap<qlonglong, osg::ref_ptr<Data::Edge> >;
	this->scale = scaling;
    this->setBall(NULL);
    this->setParentBall(NULL);
	this->hasNestedNodes = false;



	settings = new QMap<QString, QString>();
	//APA

	settings->insert("Velkost","4242");
	settings->insert("Farba","ruzova");
	//APA

	int pos = 0;
	int cnt = 0;

	labelText = this->name;

	while ((pos = labelText.indexOf(QString(" "), pos + 1)) != -1)
	{
		if (++cnt % 3 == 0)
			labelText = labelText.replace(pos, 1, "\n");
	}
	
    this->square = createNode(this->scale * 4, Node::createStateSet(this->type));
    this->focusedSquare = createNode(this->scale * 16, Node::createStateSet(this->type));
    this->addDrawable(square);
    this->label = createLabel(this->type->getScale(), labelText);

	this->force = osg::Vec3f();
	this->velocity = osg::Vec3f(0,0,0);
	this->fixed = false;
	this->ignore = false;
	this->positionCanBeRestricted = true;
	this->removableByUser = true;
	this->selected = false;
	this->usingInterpolation = true;

	//nastavenie farebneho typu
	float r = type->getSettings()->value("color.R").toFloat();
	float g = type->getSettings()->value("color.G").toFloat();
	float b = type->getSettings()->value("color.B").toFloat();
	float a = type->getSettings()->value("color.A").toFloat();

	this->setColor(osg::Vec4(r, g, b, a));
}
开发者ID:petersivak,项目名称:3dsoftviz,代码行数:60,代码来源:Node.cpp



注:本文中的createLabel函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ createLayout函数代码示例发布时间:2022-05-30
下一篇:
C++ createItem函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap