这篇教程C++ updateButton函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateButton函数的典型用法代码示例。如果您正苦于以下问题:C++ updateButton函数的具体用法?C++ updateButton怎么用?C++ updateButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateButton函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updateButtonvoid MyMaterialEditor::setMaterial(const Material &m){ m_material = m; updateButton(0, m.ambient); updateButton(1, m.diffuse); updateButton(2, m.specular); updateButton(3, m.emission); m_shininessSpinner->setValue(m.shininess);}
开发者ID:salisbury-robotics,项目名称:jks-ros-pkg,代码行数:10,
示例2: updateKnob1void stompbox_cs::updateSignal(){ updateKnob1("00", "00", "42"); updateKnob2("00", "00", "47"); updateComboBox("00", "00", "41"); updateButton("00", "00", "40");};
开发者ID:motiz88,项目名称:GR-55Floorboard,代码行数:7,
示例3: ifvoid TCPTransfer::setCurrentStackWidgetSlot(){ QObject* sender = this->sender(); QToolButton* tbtn = static_cast<QToolButton*>(sender); if(!tbtn) return; ui->friendsTBtn->setChecked(false); ui->uploadTBtn->setChecked(false); ui->historyTBtn->setChecked(false); int index = 0; if( tbtn == ui->friendsTBtn ) { tbtn->setChecked(true); index = 0; } else if( tbtn == ui->uploadTBtn ) { tbtn->setChecked(true); index = 1; } else if( tbtn == ui->historyTBtn ) { tbtn->setChecked(true); index = 2; } updateButton(index); emit currentStackWidgetSingal(index);}
开发者ID:newdebug,项目名称:NewDebug,代码行数:30,
示例4: updateButtonvoid ConfFilters::slotRemove(){ TQListViewItem *item = m_filters->currentItem(); if (item) delete item; updateButton();}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,
示例5: QWidgetReloadStopButton::ReloadStopButton(QWidget* parent) : QWidget(parent) , m_loadInProgress(false){ QHBoxLayout* lay = new QHBoxLayout(this); setLayout(lay); m_buttonStop = new ToolButton(this); m_buttonStop->setObjectName("navigation-button-stop"); m_buttonStop->setToolTip(ToolButton::tr("Stop")); m_buttonStop->setToolButtonStyle(Qt::ToolButtonIconOnly); m_buttonStop->setVisible(false); m_buttonStop->setAutoRaise(true); m_buttonStop->setFocusPolicy(Qt::NoFocus); m_buttonReload = new ToolButton(this); m_buttonReload->setObjectName("navigation-button-reload"); m_buttonReload->setToolTip(ToolButton::tr("Reload")); m_buttonReload->setToolButtonStyle(Qt::ToolButtonIconOnly); m_buttonReload->setAutoRaise(true); m_buttonReload->setFocusPolicy(Qt::NoFocus); lay->addWidget(m_buttonStop); lay->addWidget(m_buttonReload); lay->setContentsMargins(0, 0, 0, 0); lay->setSpacing(0); m_updateTimer = new QTimer(this); m_updateTimer->setInterval(100); m_updateTimer->setSingleShot(true); connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateButton()));}
开发者ID:Jose41,项目名称:qupzilla,代码行数:32,
示例6: KGetSaveSizeDialogMirrorSettings::MirrorSettings(QWidget *parent, TransferHandler *handler, const KUrl &file) : KGetSaveSizeDialog("MirrorSettings", parent), m_transfer(handler), m_file(file){ m_model = new MirrorModel(this); m_model->setMirrors(m_transfer->availableMirrors(m_file)); m_proxy = new MirrorProxyModel(this); m_proxy->setSourceModel(m_model); QWidget *widget = new QWidget(this); ui.setupUi(widget); ui.add->setGuiItem(KStandardGuiItem::add()); ui.remove->setGuiItem(KStandardGuiItem::remove()); ui.treeView->setModel(m_proxy); ui.treeView->header()->setResizeMode(QHeaderView::ResizeToContents); ui.treeView->hideColumn(MirrorItem::Priority); ui.treeView->hideColumn(MirrorItem::Country); ui.treeView->setItemDelegate(new MirrorDelegate(this)); updateButton(); connect(ui.treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateButton())); connect(ui.add, SIGNAL(clicked()), this, SLOT(addClicked())); connect(ui.remove, SIGNAL(clicked()), this, SLOT(removeMirror())); connect(this, SIGNAL(finished()), this, SLOT(save())); setMainWidget(widget); setCaption(i18n("Modify the used mirrors")); setButtons(KDialog::Close);}
开发者ID:fluxer,项目名称:kde-extraapps,代码行数:31,
示例7: resetbool WeatherPlugin::done(unsigned code, Buffer &data, const char*){ if (code != 200) return false; m_data = ""; m_day = 0; m_bBar = false; m_bWind = false; m_bUv = false; m_bCC = false; m_bMoon = false; reset(); if (!parse(data.data(), data.size(), false)){ log(L_WARN, "XML parse error"); return false; } time_t now = time(NULL); setTime(now); if (m_bForecast) setForecastTime(now); updateButton(); Event eUpdate(EventWeather); eUpdate.process(); return false;}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:25,
示例8: updateButtonvoid UserHelpDialog::slotDown(){ int entries = m_menulistbox->count(); // get current index int index = m_menulistbox->currentRow(); if (index < 0 || index == entries - 1) { return; } // insert current entry after current if (index < entries - 2) { m_menulistbox->insertItem(index + 2, m_menulistbox->currentItem()->text()); // index + 2 m_filelist.insert(index + 2, m_filelist[index]); } else { m_menulistbox->addItem(m_menulistbox->currentItem()->text()); m_filelist.append(m_filelist[index]); } // then remove the old entry m_menulistbox->takeItem(index); m_filelist.removeAt(index); // select current entry m_menulistbox->setCurrentRow(index + 1); updateButton();}
开发者ID:KDE,项目名称:kile,代码行数:29,
示例9: updateButtonvoid GUI_v1::updateMenuButton(Button *button) { if (!_displayMenu) return; updateButton(button); _screen->updateScreen();}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:7,
示例10: TQWidgetConfFilters::ConfFilters(TQWidget *parent, const char *name): TQWidget(parent, name){ m_filters = new TDEListView(this); m_filters->addColumn(i18n("Mime Type")); m_filters->addColumn(i18n("Command")); m_filters->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_filters->setLineWidth(1); m_filters->setSorting(-1); m_filters->header()->setStretchEnabled(true, 1); connect(m_filters, TQT_SIGNAL(doubleClicked(TQListViewItem*)), TQT_SLOT(slotChange())); m_add = new TQPushButton(this); m_add->setPixmap(BarIcon("document-new")); m_remove = new TQPushButton(this); m_remove->setIconSet(BarIconSet("remove")); m_change = new TQPushButton(this); m_change->setIconSet(BarIconSet("filter")); m_up = new TQPushButton(this); m_up->setIconSet(BarIconSet("go-up")); m_down = new TQPushButton(this); m_down->setIconSet(BarIconSet("go-down")); connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd())); connect(m_change, TQT_SIGNAL(clicked()), TQT_SLOT(slotChange())); connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove())); connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp())); connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown())); TQToolTip::add(m_add, i18n("Add filter")); TQToolTip::add(m_change, i18n("Modify filter")); TQToolTip::add(m_remove, i18n("Remove filter")); TQToolTip::add(m_up, i18n("Move filter up")); TQToolTip::add(m_down, i18n("Move filter down")); TQHBoxLayout *l0 = new TQHBoxLayout(this, 10, 10); TQVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0); l0->addWidget(m_filters, 1); l0->addLayout(l1, 0); l1->addWidget(m_add); l1->addWidget(m_change); l1->addWidget(m_remove); l1->addSpacing(10); l1->addWidget(m_up); l1->addWidget(m_down); l1->addStretch(1); updateButton(); connect(m_filters, TQT_SIGNAL(selectionChanged ()),TQT_SLOT(updateButton()));}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:47,
示例11: shotChangeNotifystatic voidshotChangeNotify (const char *optionName, BananaType optionType, const BananaValue *optionValue, int screenNum){ if (strcasecmp (optionName, "initiate_button") == 0) updateButton (optionValue->s, &initiate_button);}
开发者ID:jordigh,项目名称:fusilli,代码行数:9,
示例12: Q_UNUSEDvoid KexiComboBoxBase::slotRowAccepted(KexiDB::RecordData* record, int row){ Q_UNUSED(row); //update our value //..nothing to do? updateButton(); slotItemSelected(record); /*emit*/acceptRequested();}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:9,
示例13: buttonvoid YaEventNotifierInformer::notifierVisibilityChanged(){ bool enabled = notifier_->shouldBeVisible(); button()->setEnabled(enabled); if (enabled) emit activated(); else emit deactivated(); updateButton();}
开发者ID:AlekSi,项目名称:Jabbin,代码行数:10,
示例14: connectKeyPointShowSetting::KeyPointShowSetting(std::vector<cv::KeyPoint>, QWidget *parent): KeyPointSettings{parent}{ auto layout=util::make_unique<QVBoxLayout>(); auto button=util::make_unique<QPushButton>(); button_=button.get(); button_->setEnabled(true); button_->setCheckable(true); connect(button.get(),SIGNAL(clicked()),this,SLOT(updateAll())); connect(button.get(),SIGNAL(clicked()),this,SLOT(updateButton())); button->setChecked(true); layout->addWidget(button.release()); setLayout(layout.release()); updateButton();}
开发者ID:2php,项目名称:opencv_contrib,代码行数:21,
示例15: setCaptionvoid MirrorAddDlg::init(){ setCaption(i18n("Add mirror")); QWidget *widget = new QWidget(this); ui.setupUi(widget); setMainWidget(widget); if (m_countryModel) { ui.location->setModel(m_countryModel); ui.location->setCurrentIndex(-1); } setButtons(KDialog::Yes | KDialog::Cancel); setButtonGuiItem(KDialog::Yes, KStandardGuiItem::add()); updateButton(); connect(ui.url, SIGNAL(textChanged(QString)), this, SLOT(updateButton(QString))); connect(this, SIGNAL(yesClicked()), this, SLOT(addMirror()));}
开发者ID:fluxer,项目名称:kde-extraapps,代码行数:21,
示例16: TQListViewItemvoid ConfFilters::slotAdd(){ TQString mime, cmd; if (FilterDlg::doIt(this, &mime, &cmd)) if (!mime.isEmpty() && !cmd.isEmpty()) { new TQListViewItem(m_filters, m_filters->currentItem(), mime, cmd); updateButton(); } else KMessageBox::error(this, i18n("Empty parameters."));}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:12,
示例17: whilebool GHOST_NDOFManagerUnix::processEvents(){ bool anyProcessed = false; if (m_available) { spnav_event e;#ifdef USE_FINISH_GLITCH_WORKAROUND bool motion_test = false;#endif while (spnav_poll_event(&e)) { switch (e.type) { case SPNAV_EVENT_MOTION: { /* convert to blender view coords */ GHOST_TUns64 now = m_system.getMilliSeconds(); const short t[3] = {(short)e.motion.x, (short)e.motion.y, (short)-e.motion.z}; const short r[3] = {(short)-e.motion.rx, (short)-e.motion.ry, (short)e.motion.rz}; updateTranslation(t, now); updateRotation(r, now);#ifdef USE_FINISH_GLITCH_WORKAROUND motion_test = true;#endif break; } case SPNAV_EVENT_BUTTON: GHOST_TUns64 now = m_system.getMilliSeconds(); updateButton(e.button.bnum, e.button.press, now); break; } anyProcessed = true; }#ifdef USE_FINISH_GLITCH_WORKAROUND if (motion_test_prev == true && motion_test == false) { GHOST_TUns64 now = m_system.getMilliSeconds(); const short v[3] = {0, 0, 0}; updateTranslation(v, now); updateRotation(v, now); anyProcessed = true; } motion_test_prev = motion_test;#endif } return anyProcessed;}
开发者ID:DrangPo,项目名称:blender,代码行数:52,
示例18: QUrlvoid UserHelpDialog::slotAddSep(){ // get current index int index = m_menulistbox->currentRow(); if (index == -1) { return; } // insert separator m_menulistbox->insertItem(index, "-"); m_filelist.insert(index, QUrl()); updateButton();}
开发者ID:KDE,项目名称:kile,代码行数:14,
注:本文中的updateButton函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateButtonState函数代码示例 C++ updateBoundingRect函数代码示例 |