您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateStyle函数代码示例

51自学网 2021-06-03 09:14:39
  C++
这篇教程C++ updateStyle函数代码示例写得很实用,希望能帮到您。

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

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

示例1: updateStyle

void SubtitleDrawer::setStyle(const SubtitleStyle &style) {	m_style = style;	updateStyle(m_front, style);	updateStyle(m_back, style);	if (style.outline.enabled)		m_back.setTextOutline(style.outline.color, style.font.height()*style.outline.width*2.0);	else		m_back.setTextOutline(Qt::NoPen);}
开发者ID:akhilo,项目名称:cmplayer,代码行数:9,


示例2: updateStyle

void OBSHotkeyLabel::highlightPair(bool highlight){	if (!pairPartner)		return;	pairPartner->setProperty("hotkeyPairHover", highlight);	updateStyle(pairPartner);	setProperty("hotkeyPairHover", highlight);	updateStyle(this);}
开发者ID:AmesianX,项目名称:obs-studio,代码行数:10,


示例3: ASSERT

void RenderMathMLRoot::computePreferredLogicalWidths(){    ASSERT(preferredLogicalWidthsDirty());    updateStyle();    if (!isValid()) {        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;        setPreferredLogicalWidthsDirty(false);        return;    }    LayoutUnit preferredWidth = 0;    if (m_kind == SquareRoot) {        preferredWidth += m_radicalOperator.maxPreferredWidth();        setPreferredLogicalWidthsDirty(true);        RenderMathMLRow::computePreferredLogicalWidths();        preferredWidth += m_maxPreferredLogicalWidth;    } else {        ASSERT(m_kind == RootWithIndex);        preferredWidth += m_kernBeforeDegree;        preferredWidth += getIndex().maxPreferredLogicalWidth();        preferredWidth += m_kernAfterDegree;        preferredWidth += m_radicalOperator.maxPreferredWidth();        preferredWidth += getBase().maxPreferredLogicalWidth();    }    m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = preferredWidth;    setPreferredLogicalWidthsDirty(false);}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:30,


示例4: RoundItemButton

void ShutdownWidget::initUI() {    m_requireShutdownButton = new RoundItemButton(tr("Shut down"), this);    m_requireShutdownButton->setObjectName("RequireShutdownButton");    m_requireShutdownButton->setAutoExclusive(true);    m_requireRestartButton = new RoundItemButton(tr("Restart"), this);    m_requireRestartButton->setObjectName("RequireRestartButton");    m_requireRestartButton->setAutoExclusive(true);    m_requireSuspendBUtton = new RoundItemButton(tr("Suspend"), this);    m_requireSuspendBUtton->setObjectName("RequireSuspendButton");    m_requireSuspendBUtton->setAutoExclusive(true);    m_currentSelectedBtn = m_requireShutdownButton;    m_currentSelectedBtn->updateState(RoundItemButton::Default);    m_btnList = new QList<RoundItemButton*>;    m_btnList->append(m_requireShutdownButton);    m_btnList->append(m_requireRestartButton);    m_btnList->append(m_requireSuspendBUtton);    m_Layout = new QHBoxLayout;    m_Layout->setMargin(0);    m_Layout->setSpacing(10);    m_Layout->addStretch(0);    m_Layout->addWidget(m_requireShutdownButton);    m_Layout->addWidget(m_requireRestartButton);    m_Layout->addWidget(m_requireSuspendBUtton);    m_Layout->addStretch(0);    setLayout(m_Layout);    updateStyle(":/skin/requireshutdown.qss", this);}
开发者ID:Kirek,项目名称:deepin-session-ui-manjaro,代码行数:33,


示例5: EnumProperty

PathDisplay::PathDisplay(){  style_property_ = new EnumProperty( "Line Style", "Lines",                                      "The rendering operation to use to draw the grid lines.",                                      this, SLOT( updateStyle() ));  style_property_->addOption( "Lines", LINES );  style_property_->addOption( "Billboards", BILLBOARDS );  line_width_property_ = new FloatProperty( "Line Width", 0.03,                                            "The width, in meters, of each path line."                                            "Only works with the 'Billboards' style.",                                            this, SLOT( updateLineWidth() ), this );  line_width_property_->setMin( 0.001 );  line_width_property_->hide();  color_property_ = new ColorProperty( "Color", QColor( 25, 255, 0 ),                                       "Color to draw the path.", this );  alpha_property_ = new FloatProperty( "Alpha", 1.0,                                       "Amount of transparency to apply to the path.", this );  buffer_length_property_ = new IntProperty( "Buffer Length", 1,                                             "Number of paths to display.",                                             this, SLOT( updateBufferLength() ));  buffer_length_property_->setMin( 1 );  offset_property_ = new VectorProperty( "Offset", Ogre::Vector3::ZERO,                                         "Allows you to offset the path from the origin of the reference frame.  In meters.",                                         this, SLOT( updateOffset() ));}
开发者ID:JoSungUk,项目名称:My_1st_ROScode,代码行数:31,


示例6: QMainWindow

/* Widgets */Widgets::Widgets(QWidget* parent)    : QMainWindow(parent){    m_officeStyle = Q_NULL;    setWindowTitle(tr("Qtitan Widgets Sample"));    m_styleName = qApp->style()->objectName();    m_mdiArea = new QMdiArea;    m_mdiArea->setViewMode(QMdiArea::TabbedView);    m_mdiArea->setLineWidth(3);    m_mdiArea->setFrameShape(QFrame::Panel);    m_mdiArea->setFrameShadow(QFrame::Sunken);    setCentralWidget(m_mdiArea);    setIconSize(QSize(16, 16));    createActions();    createDockWindows();    createMenubar();    createToolbar();    statusBar();    createMdiChild();    QRect geom = QApplication::desktop()->availableGeometry();    resize(2 * geom.width() / 3, 2 * geom.height() / 3);    updateStyle(m_actOffice2007Style);    updateTheme(m_actBlueTheme);    readSettings();}
开发者ID:lixunguang,项目名称:myhelloworld,代码行数:35,


示例7: setAccessibleName

GridButton::GridButton(const int i , const int j , QWidget *parent)    :QPushButton(parent){    setAccessibleName(QString("GridButton"));    row = i;    col = j;    XIcon = QIcon(":/new/prefix1/images/x3.png");    color = QColor(Qt::white);    borderTop = QColor();    borderRight = QColor();    borderBottom = QColor();    borderLeft = QColor();    borderTop.setNamedColor("#A0A0A0");    borderRight.setNamedColor("#A0A0A0");    borderBottom.setNamedColor("#A0A0A0");    borderLeft.setNamedColor("#A0A0A0");    this->setFixedSize(20,20);    //Load the stylesheet file for widgets    QFile stylesFile(":/new/prefix1/qss/styles.qss");    if(stylesFile.open(QIODevice::ReadOnly | QIODevice::Text))    {        qss = stylesFile.readAll();        stylesFile.close();    }    initBorders();    updateStyle();}
开发者ID:Armine13,项目名称:nonograms,代码行数:28,


示例8: updateStyle

void LayoutButton::setButtonChecked(bool checked) {    if (checked) {        this->setChecked(true);        m_textLabel->setProperty("Checked", true);        m_iconLabel->show();        updateStyle(":/skin/layoutbutton.qss", this);    } else {        this->setChecked(false);        m_textLabel->setProperty("Checked", false);        updateStyle(":/skin/layoutbutton.qss", this);        m_iconLabel->hide();    }    updateStyleSelf();}
开发者ID:Kirek,项目名称:deepin-session-ui-manjaro,代码行数:16,


示例9: QPushButton

LayoutButton::LayoutButton(QString text, QWidget *parent)    : QPushButton(parent){    setObjectName("LayoutButton");    setCheckable(true);    m_text = text;    m_iconLabel = new QLabel(this);    QPixmap pix(":img/tick_hover.png");    m_iconLabel->setPixmap(pix);    m_iconLabel->setMinimumSize(pix.size());    m_textLabel = new QLabel;    m_textLabel->setObjectName("LayoutTextLabel");    m_textLabel->setText(text);    m_iconLabel->hide();    QHBoxLayout* m_Layout = new QHBoxLayout;    m_Layout->setContentsMargins(20, 0, 0, 0);    m_Layout->setSpacing(0);    m_Layout->addSpacing(5);    m_Layout->addWidget(m_textLabel);    m_Layout->addStretch();    setLayout(m_Layout);    m_iconLabel->move(this->x() + 5, this->y() + 4);    updateStyle(":/skin/layoutbutton.qss", this);}
开发者ID:Kirek,项目名称:deepin-session-ui-manjaro,代码行数:30,


示例10: setObjectName

void KbLayoutWidget::initUI() {    setObjectName("KeyboardLayoutFrame");    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    setSelectionMode(QAbstractItemView::NoSelection);    setResizeMode(Adjust);    for (int i = 0; i < m_buttons.length(); i++) {        LayoutButton* itemButton = new LayoutButton(m_buttons[i]);        m_layoutButtons.append(itemButton);        itemButton->setFixedSize(widget_width, DDESESSIONCC::LAYOUTBUTTON_HEIGHT);        QFrame* borderFrame = new QFrame;        borderFrame->setObjectName("LayoutBorderFrame");        QVBoxLayout* borderLayout = new QVBoxLayout;        borderLayout->setContentsMargins(0, 0, 0, 0);        borderLayout->setSpacing(0);        borderLayout->addWidget(itemButton);        borderFrame->setLayout(borderLayout);        borderFrame->setFixedSize(widget_width, DDESESSIONCC::LAYOUTBUTTON_HEIGHT);        QListWidgetItem* item = new QListWidgetItem(this);        item->sizeHint();        this->addItem(item);        setItemWidget(item,  borderFrame);        this->setGridSize(QSize(widget_width, DDESESSIONCC::LAYOUTBUTTON_HEIGHT));        this->setFixedWidth(widget_width);    }    this->setFixedHeight(DDESESSIONCC::LAYOUTBUTTON_HEIGHT*3);    updateStyle(":/skin/keybdlayoutwidget.qss", this);}
开发者ID:Kirek,项目名称:deepin-session-ui-manjaro,代码行数:34,


示例11: setDoc

void PropertyWidget_Advanced::setCurrentItem(PageItem *item){	if (!m_ScMW || m_ScMW->scriptIsRunning())		return;	//CB We shouldn't really need to process this if our item is the same one	//maybe we do if the item has been changed by scripter.. but that should probably	//set some status if so.	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.	//if (m_item == i)	//	return;	if (item && m_doc.isNull())		setDoc(item->doc());	m_item = item;	disconnectSignals();	configureWidgets();	if (m_item)	{		if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())		{			ParagraphStyle parStyle =  m_item->itemText.defaultStyle();			if (m_doc->appMode == modeEdit)				m_item->currentTextProps(parStyle);			else if (m_doc->appMode == modeEditTable)				m_item->asTable()->activeCell().textFrame()->currentTextProps(parStyle);			updateStyle(parStyle);		}		connectSignals();	}}
开发者ID:Sheikha443,项目名称:scribus,代码行数:33,


示例12: Q_D

void MAbstractLayoutPolicy::setStyleName(const QString &name){    Q_D(MAbstractLayoutPolicy);    if (name == d->styleName)        return;    d->styleName = name;    updateStyle();}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:8,


示例13: updateThemes

void ConfigTabAppearance::showEvent(QShowEvent *event){    updateThemes();    updateStyle();    ui->scrollAreaTheme->setMinimumWidth( ui->scrollAreaThemeContents->minimumSizeHint().width()                                          + ui->scrollAreaTheme->verticalScrollBar()->width() + 8);    QWidget::showEvent(event);}
开发者ID:m4r71n,项目名称:CopyQ,代码行数:8,


示例14: applyStyle

void UIWidget::mergeStyle(const OTMLNodePtr& styleNode){    applyStyle(styleNode);    std::string name = m_style->tag();    std::string source = m_style->source();    m_style->merge(styleNode);    m_style->setTag(name);    m_style->setSource(source);    updateStyle();}
开发者ID:Pucker,项目名称:otclient,代码行数:10,


示例15: if

void KateStyleTreeWidgetItem::unsetColor( int c ){  if ( c == 100 && currentStyle->hasProperty(QTextFormat::BackgroundBrush) )    currentStyle->clearProperty(QTextFormat::BackgroundBrush);  else if ( c == 101 && currentStyle->hasProperty(KTextEditor::Attribute::SelectedBackground) )    currentStyle->clearProperty(KTextEditor::Attribute::SelectedBackground);  updateStyle();  treeWidget()->emitChanged();}
开发者ID:fluxer,项目名称:kde-baseapps,代码行数:10,


示例16: device

void GuiSettingsWidget::colorChanged(int index){	SettingsProvider *settings = device()->settingsProvider();	if(!settings) return;		const QColor &selection = guiColors[index];	settings->setValue(GUI_COLOR_KEY, selection);	updateStyle(device());	settings->sync();}
开发者ID:kipr,项目名称:botui,代码行数:10,


示例17: connect

/* ********************************************************************* */void LogBookConfigDialog::createDialogContent(){	ui->setupUi(dialog);	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));	setupWidgets();	setupListViews();	//Initialize the style	updateStyle();}
开发者ID:incadoi,项目名称:stellarium-1,代码行数:11,


示例18: Display

GridDisplay::GridDisplay(): Display(){  frame_property_ = new TfFrameProperty( "Reference Frame", TfFrameProperty::FIXED_FRAME_STRING,                                         "The TF frame this grid will use for its origin.",                                         this, 0, true );  cell_count_property_ = new IntProperty( "Plane Cell Count", 10,                                          "The number of cells to draw in the plane of the grid.",                                          this, SLOT( updateCellCount() ));  cell_count_property_->setMin( 1 );  height_property_ = new IntProperty( "Normal Cell Count", 0,                                      "The number of cells to draw along the normal vector of the grid. "                                      " Setting to anything but 0 makes the grid 3D.",                                      this, SLOT( updateHeight() ));  height_property_->setMin( 0 );  cell_size_property_ = new FloatProperty( "Cell Size", 1.0f,                                           "The length, in meters, of the side of each cell.",                                           this, SLOT( updateCellSize() ));  cell_size_property_->setMin( 0.0001 );  style_property_ = new EnumProperty( "Line Style", "Lines",                                      "The rendering operation to use to draw the grid lines.",                                      this, SLOT( updateStyle() ));  style_property_->addOption( "Lines", Grid::Lines );  style_property_->addOption( "Billboards", Grid::Billboards );  line_width_property_ = new FloatProperty( "Line Width", 0.03,                                            "The width, in meters, of each grid line.",                                            style_property_, SLOT( updateLineWidth() ), this );  line_width_property_->setMin( 0.001 );  line_width_property_->hide();  color_property_ = new ColorProperty( "Color", Qt::gray,                                       "The color of the grid lines.",                                       this, SLOT( updateColor() ));  alpha_property_ = new FloatProperty( "Alpha", 0.5f,                                       "The amount of transparency to apply to the grid lines.",                                       this, SLOT( updateColor() ));  alpha_property_->setMin( 0.0f );  alpha_property_->setMax( 1.0f );  plane_property_ = new EnumProperty( "Plane", "XY",                                      "The plane to draw the grid along.",                                      this, SLOT( updatePlane() ));  plane_property_->addOption( "XY", XY );  plane_property_->addOption( "XZ", XZ );  plane_property_->addOption( "YZ", YZ );  offset_property_ = new VectorProperty( "Offset", Ogre::Vector3::ZERO,                                         "Allows you to offset the grid from the origin of the reference frame.  In meters.",                                         this, SLOT( updateOffset() ));}
开发者ID:jkammerl,项目名称:rviz,代码行数:55,


示例19: QStaticText

void NodeLabel::setText(const QString & text){    // update the text    m_text = QStaticText(text);    m_text.setTextFormat(Qt::PlainText);    QTextOption textOption =        QTextOption(Qt::AlignHCenter | Qt::AlignBaseline);    textOption.setUseDesignMetrics(false);    m_text.setTextOption(textOption);    updateStyle();}
开发者ID:HolyHighPoint,项目名称:Relarank,代码行数:11,


示例20: tempSelection

void PropertiesPalette_Text::handleLineSpacingMode(int id){	if ((m_haveDoc) && (m_haveItem))	{		Selection tempSelection(this, false);		tempSelection.addItem(m_item, true);		m_doc->itemSelection_SetLineSpacingMode(id, &tempSelection);		updateStyle(((m_doc->appMode == modeEdit) || (m_doc->appMode == modeEditTable)) ? m_item->currentStyle() : m_item->itemText.defaultStyle());		m_doc->regionsChanged()->update(QRect());	}}
开发者ID:JLuc,项目名称:scribus,代码行数:11,


示例21: logTraceError

void UIWidget::setStyle(const std::string& styleName){    OTMLNodePtr styleNode = g_ui.getStyle(styleName);    if(!styleNode) {        logTraceError("unable to retrive style '", styleName, "': not a defined style");        return;    }    applyStyle(styleNode);    m_style = styleNode;    updateStyle();}
开发者ID:AndreFaramir,项目名称:otclient,代码行数:11,


示例22: loadTransformers

void MapCloudDisplay::onInitialize(){	MFDClass::onInitialize();	transformer_class_loader_ = new pluginlib::ClassLoader<rviz::PointCloudTransformer>( "rviz", "rviz::PointCloudTransformer" );	loadTransformers();	updateStyle();	updateBillboardSize();	updateAlpha();	spinner_.start();}
开发者ID:gerryfan,项目名称:rtabmap_ros,代码行数:13,


示例23: QWidget

CanvasWidget::CanvasWidget(QWidget *parent) :    QWidget(parent), selected(NULL), transformation(NONE){    epsilon.x = 20;    epsilon.y = 20;    creatingType = 1;    zigzagPointsAmount = 5;    defaultOffsetParallelogram = 30.0;    currentBackColor = Color(1, 1, 1, 1);    currentLineColor = Color(.0, 0, 0, 1);    arrowsTipCoefficient = 0.2;    updateStyle();}
开发者ID:tilast,项目名称:courseWork,代码行数:14,


示例24: setupConnections

/* ********************************************************************* */void TargetsDialog::createDialogContent(){	ui->setupUi(dialog);	ui->targetsListView->setModel(tableModel);	ui->targetsListView->setModelColumn(1);	ui->typeComboBox->setModel(typeTableModel);	ui->typeComboBox->setModelColumn(typeTableModel->fieldIndex("type"));		setupConnections();	ui->targetsListView->setCurrentIndex(tableModel->index(0, 1));		//Initialize the style	updateStyle();}
开发者ID:NGCyang,项目名称:stellarium,代码行数:15,


示例25: setDoc

void PropertiesPalette_Text::setCurrentItem(PageItem *i){	if (!m_ScMW || m_ScMW->scriptIsRunning())		return;	//CB We shouldn't really need to process this if our item is the same one	//maybe we do if the item has been changed by scripter.. but that should probably	//set some status if so.	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.	//if (m_item == i)	//	return;	if (!m_doc)		setDoc(i->doc());	m_haveItem = false;	m_item = i;	showFirstLinePolicy(m_item->firstLineOffset());	if ((m_item->isGroup()) && (!m_item->isSingleSel))	{		setEnabled(false);	}	m_haveItem = true;	if (!sender())	{		colorWidgets->handleSelectionChanged();		distanceWidgets->handleSelectionChanged();		parEffectWidgets->handleSelectionChanged();	}	if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())	{		ParagraphStyle parStyle =  m_item->itemText.defaultStyle();		if (m_doc->appMode == modeEdit || m_doc->appMode == modeEditTable)			m_item->currentTextProps(parStyle);		updateStyle(parStyle);	}	if (m_item->asOSGFrame())	{		setEnabled(false);	}	if (m_item->asSymbolFrame())	{		setEnabled(false);	}}
开发者ID:Fahad-Alsaidi,项目名称:scribus-svn,代码行数:49,



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


C++ updateTimeout函数代码示例
C++ updateStatusBar函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。