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

C++ enableControls函数代码示例

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

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



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

示例1: enableControls

void CMainWindow::on_pbPlayPause_clicked(bool) {
    playing = !playing;

    if(playing) {
        timerParams.curTemps = 1;
        timerParams.curMeasure = 1;
        timerParams.nbMute = spMute->value();
        timerParams.nbMuteOver = spMuteOver->value();
        timerParams.timerValue = 0;
        realTime = 0;
        timerParams.nbBeat = spNbBeat->value();
        timerParams.nbDiv = spNbDiv->value();
        timerParams.nbTemps = timerParams.nbBeat * timerParams.nbDiv;
        timerParams.pads = &pads;

        enableControls(false);

        pbPlayPause->setIcon(QIcon(":/qtdrum/resources/images/stop.png"));

        startPOSIXTimer(ONE_MINUTE / spTempo->value() / timerParams.nbDiv);

        realTimeTimer->start();
    }else {
        realTimeTimer->stop();

        ssTemps->setValue(0);
        taTimer->setValues(0, 0);

        enableControls(true);

        pbPlayPause->setIcon(QIcon(":/qtdrum/resources/images/play.png"));

        stopPOSIXTimer();
    }
}
开发者ID:clebail,项目名称:qtdrum,代码行数:35,代码来源:CMainWindow.cpp


示例2: LOG

void ImportIconsWizard::menuSelection(MythUIButtonListItem *item)
{
    if (!item)
        return;

    SearchEntry entry = item->GetData().value<SearchEntry>();

    LOG(VB_GENERAL, LOG_INFO, QString("Menu Selection: %1 %2 %3")
        .arg(entry.strID) .arg(entry.strName) .arg(entry.strLogo));

    enableControls(STATE_SEARCHING);

    CSVEntry entry2 = (*m_missingIter);
    m_strMatches += QString("%1,%2,%3,%4,%5,%6,%7,%8,%9\n")
                    .arg(escape_csv(entry.strID))
                    .arg(escape_csv(entry2.strName))
                    .arg(escape_csv(entry2.strXmlTvId))
                    .arg(escape_csv(entry2.strCallsign))
                    .arg(escape_csv(entry2.strTransportId))
                    .arg(escape_csv(entry2.strAtscMajorChan))
                    .arg(escape_csv(entry2.strAtscMinorChan))
                    .arg(escape_csv(entry2.strNetworkId))
                    .arg(escape_csv(entry2.strServiceId));

    if (checkAndDownload(entry.strLogo, entry2.strChanId))
    {
        m_statusText->SetText(tr("Icon for %1 was downloaded successfully.")
                              .arg(entry2.strName));
    }
    else
    {
        m_statusText->SetText(tr("Failed to download the icon for %1.")
                              .arg(entry2.strName));
    }

    if (m_missingMaxCount > 1)
    {
        m_missingCount++;
        m_missingIter++;
        if (!doLoad())
        {
            if (!m_strMatches.isEmpty())
                askSubmit(m_strMatches);
            else
                Close();
        }
    }
    else
    {
        enableControls(STATE_DISABLED);

        SetFocusWidget(m_iconsList);
        if (!m_strMatches.isEmpty())
            askSubmit(m_strMatches);
        else
            Close();
    }

}
开发者ID:samuelschen,项目名称:mythtv,代码行数:59,代码来源:importicons.cpp


示例3: enableControls

void MidiConverterDialog::on_startButton_clicked() {
	if (ui->pcmList->count() == 0) {
		if (batchMode) {
			((QWidget *)parent())->close();
			return;
		}
		enableControls(true);
		return;
	}
	enableControls(false);
	ui->pcmList->setCurrentRow(0);
	const QStringList midiFileNames = getMidiFileNames();
	if (!converter.convertMIDIFiles(ui->pcmList->currentItem()->text(), midiFileNames, ui->profileComboBox->currentText())) enableControls(true);
}
开发者ID:realnc,项目名称:munt,代码行数:14,代码来源:MidiConverterDialog.cpp


示例4: locker

void StaticStreamViewport::StaticStreamComponent::buttonClicked( Button* button)
{
	ScopedLock locker(lock);

	if (&startButton == button)
	{
		tree.setProperty(Identifiers::Active, true, nullptr);
		client->setStreamProperty(tree.getParent().getType(), tree[Identifiers::Index], Identifiers::Active, true);
		enableControls(true);
		return;
	}

#if FAULT_INJECTION_1722
	if (&faultButton == button)
	{
		if (tree.getParent().isValid())
		{
			FaultInjectionCallout * callout = new FaultInjectionCallout(tree.getParent(), lock, client);
			CallOutBox::launchAsynchronously(callout, button->getScreenBounds(), nullptr);
		}
		return;
	}
#endif

	if (&stopButton == button)
	{
		tree.setProperty(Identifiers::Active, false, nullptr);
		client->setStreamProperty(tree.getParent().getType(), tree[Identifiers::Index], Identifiers::Active, false);
		enableControls(false);
		return;
	}

	if (&clockReferenceButton == button)
	{
		int subtype = (button->getToggleState()) ? AVTP_SUBTYPE_CRS : AVTP_SUBTYPE_AUDIO;
		tree.setProperty(Identifiers::Subtype, subtype, nullptr);
		client->setStreamProperty(tree.getParent().getType(), tree[Identifiers::Index], Identifiers::Subtype, subtype);
		return;
	}

	if (&autoStartButton == button)
	{
		bool autostart = button->getToggleState();
		tree.setProperty(Identifiers::AutoStart, autostart, nullptr);
		client->setStreamProperty(tree.getParent().getType(), tree[Identifiers::Index], Identifiers::AutoStart, autostart);\
		return;
	}
}
开发者ID:mattgonzalez,项目名称:WorkbenchRemote,代码行数:48,代码来源:StaticStreamViewport.cpp


示例5: lyxview

bool GuiCompareHistory::initialiseParams(std::string const &)
{
	string revstring = lyxview().currentBufferView()->buffer().lyxvc().revisionInfo(LyXVC::File);
	int rev=0;

	string tmp;
	// RCS case
	if (!isStrInt(revstring))
		revstring = rsplit(revstring, tmp , '.' );
	if (isStrInt(revstring))
		rev = convert<int>(revstring);

	okPB->setEnabled(rev);
	rev1SB->setMaximum(rev);
	rev2SB->setMaximum(rev);
	revbackSB->setMaximum(rev-1);
	rev2SB->setValue(rev);
	rev1SB->setValue(rev-1);

	//bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
	//bc().setOK(okPB);
	//bc().setCancel(cancelPB);
	enableControls();
	return true;
}
开发者ID:JoaquimBellmunt,项目名称:lyx,代码行数:25,代码来源:GuiCompareHistory.cpp


示例6: enableControls

/* ////////////////////////////////////////////////////////////////////////////
 * Close the current project and free used resources.
 * Disable navigation.
 */
void TTMpeg2MainWnd::closeProject()
{
  if (!isProjectOpen)
    return;

  isProjectOpen = false;

  enableControls(false);
  scroller->setValue(0);
  videoFileInfo->clearControl();
  frameInfo->clearControl();
  currentFrame->closeVideoStream();

  // clean up used resources
  if (mpegStream != NULL)
  {
    delete mpegStream;
    mpegStream = NULL;
  }

  if (videoType != NULL)
  {
    delete videoType;
    videoType = NULL;
  }

  videoIndexList  = NULL;
  videoHeaderList = NULL;
}
开发者ID:BackupTheBerlios,项目名称:ttcut-svn,代码行数:33,代码来源:ttmpeg2mainwnd.cpp


示例7: Q_D

void
PrefsRunProgramWidget::changeExecutable() {
  Q_D(PrefsRunProgramWidget);

  auto filters = QStringList{};

#if defined(SYS_WINDOWS)
  filters << QY("Executable files") + Q(" (*.exe *.bat *.cmd)");
#endif
  filters << QY("All files") + Q(" (*)");

  auto realExecutable = Util::replaceMtxVariableWithApplicationDirectory(d->executable);
  auto newExecutable  = Util::getOpenFileName(this, QY("Select executable"), realExecutable, filters.join(Q(";;")));
  newExecutable       = QDir::toNativeSeparators(Util::replaceApplicationDirectoryWithMtxVariable(newExecutable));

  if (newExecutable.isEmpty() || (newExecutable == d->executable))
    return;

  changeArguments([&newExecutable](QStringList &arguments) {
    if (arguments.isEmpty())
      arguments << newExecutable;
    else
      arguments[0] = newExecutable;
  });

  d->executable = newExecutable;

  enableControls();

  emit titleChanged();
}
开发者ID:basicmaster,项目名称:mkvtoolnix,代码行数:31,代码来源:prefs_run_program_widget.cpp


示例8: TEST

TEST(chatpresenter, test_incomingMessages)
{
    Poco::SharedPtr<MockChatService> m(new MockChatService);

    Mvp::Presenter::TextChatPresenter presenter(m.get());
    Poco::SharedPtr<MockChatView> v(new MockChatView());
    EXPECT_CALL(*v, initialize());

    ON_CALL(*m, getParticipants())
        .WillByDefault(Return(contacts));
    ON_CALL(*m, messageHistory(_))
        .WillByDefault(Return(messages));

    EXPECT_CALL(*m, chatName());
    EXPECT_CALL(*v, setChatTitle(_));
    EXPECT_CALL(*m, messageHistory(_));
    EXPECT_CALL(*m, isConsumer());
    EXPECT_CALL(*v, enableControls(_));
    EXPECT_CALL(*v, showLeaveAction(_));
    EXPECT_CALL(*m, getParticipants());
    EXPECT_CALL(*v, setParticipants(_));
    presenter.setView(v.get());

    EXPECT_CALL(*v, showView());
    presenter.showView();

    EXPECT_CALL(*v, addMessage(_));
    m->triggerIncomingMessage();
}
开发者ID:goodinges,项目名称:Ciao-Chat,代码行数:29,代码来源:test-textchatpresenter.cpp


示例9: setupUi

/* ////////////////////////////////////////////////////////////////////////////
 * Default constructor
 */
TTMpeg2MainWnd::TTMpeg2MainWnd()
  :QMainWindow()
{
  setupUi(this);

  // some default values
  currentStreamOrder = -1;
  isProjectOpen      = false;
  sliderUpdateFrame  = false;

  enableControls(false);

  // Conect signals from main menu
  connect(actionFileOpen,  SIGNAL(triggered()), videoFileInfo, SLOT(onFileOpen()));
  connect(actionAnalyze,   SIGNAL(triggered()), SLOT(onAnalyze()));
  connect(actionSettings,  SIGNAL(triggered()), SLOT(onSettings()));
  connect(actionExit,      SIGNAL(triggered()), SLOT(onExit()));

  connect(actionWriteHeaderList, SIGNAL(triggered()), SLOT(onWriteHeaderList()));

  // Connect signals from video file info widget
  connect(videoFileInfo,  SIGNAL(fileOpened(QString)), SLOT(onLoadVideoFile(QString)));

  // Connect signals from the step control widget
  connect(stepControl,    SIGNAL(gotoNextFrame(int, int)), SLOT(onGotoNextFrame(int, int)));
  connect(stepControl,    SIGNAL(gotoPrevFrame(int, int)), SLOT(onGotoPrevFrame(int, int)));

  // Scroller
  connect(scroller,       SIGNAL(valueChanged(int)), SLOT(onSliderValueChanged(int)));
}
开发者ID:BackupTheBerlios,项目名称:ttcut-svn,代码行数:33,代码来源:ttmpeg2mainwnd.cpp


示例10: FSClassifiedItem

void FSPanelClassifieds::processProperties(void* data, EAvatarProcessorType type)
{
	if(APT_CLASSIFIEDS == type)
	{
		LLAvatarClassifieds* c_info = static_cast<LLAvatarClassifieds*>(data);
		if(c_info && getAvatarId() == c_info->target_id)
		{
			// do not clear classified list in case we will receive two or more data packets.
			// list has been cleared in updateData(). (fix for EXT-6436)

			LLAvatarClassifieds::classifieds_list_t::const_iterator it = c_info->classifieds_list.begin();
			for(; c_info->classifieds_list.end() != it; ++it)
			{
				LLAvatarClassifieds::classified_data c_data = *it;

				FSClassifiedItem* c_item = new FSClassifiedItem(getAvatarId(), c_data.classified_id);
				c_item->childSetAction("info_chevron", boost::bind(&FSPanelClassifieds::onClickInfo, this));
				c_item->setClassifiedName(c_data.name);

				LLSD pick_value = LLSD();
				pick_value.insert(CLASSIFIED_ID, c_data.classified_id);
				pick_value.insert(CLASSIFIED_NAME, c_data.name);

				if (!findClassifiedById(c_data.classified_id))
				{
					mClassifiedsList->addItem(c_item, pick_value);
				}

				c_item->setDoubleClickCallback(boost::bind(&FSPanelClassifieds::onDoubleClickClassifiedItem, this, _1));
				c_item->setRightMouseUpCallback(boost::bind(&FSPanelClassifieds::onRightMouseUpItem, this, _1, _2, _3, _4));
				c_item->setMouseUpCallback(boost::bind(&FSPanelClassifieds::updateButtons, this));
			}

			resetDirty();
			updateButtons();
		}
		
		mNoClassifieds = !mClassifiedsList->size();

        bool no_data = mNoClassifieds;
        mNoItemsLabel->setVisible(no_data);
        if (no_data)
        {
            if(getAvatarId() == gAgentID)
            {
                mNoItemsLabel->setValue(LLTrans::getString("NoClassifiedsText"));
            }
            else
            {
                mNoItemsLabel->setValue(LLTrans::getString("NoAvatarClassifiedsText"));
            }
        }

        enableControls();
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:56,代码来源:fspanelprofileclassifieds.cpp


示例11: mapChanged

void GPControlView::on_gpMapSelector_mapSelected(const QString &mapPath)
{
    if (gpControl->setMap(mapPath)) {
        emit mapChanged(gpControl);
        enableControls();
    } else {
        QMessageBox msg(this);
        msg.setText(tr("Invalid map, please choose another one."));
        msg.exec();
    }
}
开发者ID:Marechal-L,项目名称:GrandPrix,代码行数:11,代码来源:gpcontrolview.cpp


示例12: ConfigTaskWidget

ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
{
    m_telemetry = new Ui_CC_HW_Widget();
    m_telemetry->setupUi(this);

    ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
    Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
    if(!settings->useExpertMode())
        m_telemetry->saveTelemetryToRAM->setVisible(false);


    UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
    int id = utilMngr->getBoardModel();

    switch (id) {
    case 0x0101:
        m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0101.svg"));
        break;
    case 0x0301:
        m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0301.svg"));
        break;
    case 0x0401:
        m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
        break;
    case 0x0402:
        m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
        break;
    case 0x0201:
        m_telemetry->label_2->setPixmap(QPixmap(":/uploader/images/deviceID-0201.svg"));
        break;
    default:
        m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
        break;
    }
    addApplySaveButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD);
    addUAVObjectToWidgetRelation("HwCopterControl","FlexiPort",m_telemetry->cbFlexi);
    addUAVObjectToWidgetRelation("HwCopterControl","MainPort",m_telemetry->cbTele);
    addUAVObjectToWidgetRelation("HwCopterControl","RcvrPort",m_telemetry->cbRcvr);
    addUAVObjectToWidgetRelation("HwCopterControl","USB_HIDPort",m_telemetry->cbUsbHid);
    addUAVObjectToWidgetRelation("HwCopterControl","USB_VCPPort",m_telemetry->cbUsbVcp);
    addUAVObjectToWidgetRelation("ModuleSettings","TelemetrySpeed",m_telemetry->telemetrySpeed);
    addUAVObjectToWidgetRelation("ModuleSettings","GPSSpeed",m_telemetry->gpsSpeed);
    addUAVObjectToWidgetRelation("ModuleSettings","ComUsbBridgeSpeed",m_telemetry->comUsbBridgeSpeed);

    // Load UAVObjects to widget relations from UI file
    // using objrelation dynamic property
    autoLoadWidgets();

    connect(m_telemetry->cchwHelp,SIGNAL(clicked()),this,SLOT(openHelp()));
    enableControls(false);
    populateWidgets();
    refreshWidgetsValues();
    forceConnectedState();
}
开发者ID:johnm1,项目名称:flyingf4_int_flash,代码行数:54,代码来源:config_cc_hw_widget.cpp


示例13: updateUserSettings

void WelcomeDialog::verifyAccountDone(bool succeeded, const CString& errorMessage)
{
    if (succeeded) {
        updateUserSettings();
        QDialog::accept();
    } else {
        QMessageBox::critical(this, "", errorMessage);
    }

    enableControls(true);
}
开发者ID:snjxiaojing,项目名称:WizQTClient,代码行数:11,代码来源:wizwelcomedialog.cpp


示例14: newGPControl

void GPControlView::on_abortbutton_clicked()
{
    gpControl->disconnect(SIGNAL(end(QString)));
    gpControl->disconnect(SIGNAL(carMoved()));
    gpControl->disconnect(SIGNAL(carMovedWithBoost()));
    gpControl->disconnect(SIGNAL(invalidMove()));
    gpControl->disconnect(SIGNAL(syntaxError()));
    gpControl->disconnect(SIGNAL(driverTimeout()));

    newGPControl();
    enableControls();
}
开发者ID:Marechal-L,项目名称:GrandPrix,代码行数:12,代码来源:gpcontrolview.cpp


示例15: enableControls

void QtPSTNNumber::onNumberChanged(const QString &text)
{
    // Only enable the controls is the text is bigger than the minimalLength.
    enableControls((text.length() >= minimalLength));

    // Always add the country indicator in front of the number.
    if (text.length() > 0)
        ui->labelNumber->setText((text[0] == '+') ? text : "+" + text);
    else
        ui->labelNumber->setText("+");

}
开发者ID:goodinges,项目名称:Ciao-Chat,代码行数:12,代码来源:qtpstnnumber.cpp


示例16: LoadWindowFromXML

bool ImportIconsWizard::Create()
{
    if (!initialLoad(m_strChannelname))
        return false;


    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("config-ui.xml", "iconimport", this);

    if (!foundtheme)
        return false;

    m_iconsList = dynamic_cast<MythUIButtonList *>(GetChild("icons"));
    m_manualEdit = dynamic_cast<MythUITextEdit *>(GetChild("manualsearch"));
    m_nameText = dynamic_cast<MythUIText *>(GetChild("name"));
    m_manualButton = dynamic_cast<MythUIButton *>(GetChild("search"));
    m_skipButton = dynamic_cast<MythUIButton *>(GetChild("skip"));
    m_statusText = dynamic_cast<MythUIText *>(GetChild("status"));
    m_preview = dynamic_cast<MythUIImage *>(GetChild("preview"));
    m_previewtitle = dynamic_cast<MythUIText *>(GetChild("previewtitle"));

    if (!m_iconsList || !m_manualEdit || !m_nameText || !m_manualButton ||
        !m_skipButton || !m_statusText)
    {
        LOG(VB_GENERAL, LOG_ERR,
            "Unable to load window 'iconimport', missing required element(s)");
        return false;
    }

    m_nameText->SetEnabled(false);

    m_nameText->SetHelpText(tr("Name of the icon file"));
    m_iconsList->SetHelpText(tr("List of possible icon files"));
    m_manualEdit->SetHelpText(tr("Enter text here for the manual search"));
    m_manualButton->SetHelpText(tr("Manually search for the text"));
    m_skipButton->SetHelpText(tr("Skip this icon"));

    connect(m_manualButton, SIGNAL(Clicked()), SLOT(manualSearch()));
    connect(m_skipButton, SIGNAL(Clicked()), SLOT(skip()));
    connect(m_iconsList, SIGNAL(itemClicked(MythUIButtonListItem *)),
            SLOT(menuSelection(MythUIButtonListItem *)));
    connect(m_iconsList, SIGNAL(itemSelected(MythUIButtonListItem *)),
            SLOT(itemChanged(MythUIButtonListItem *)));

    BuildFocusList();

    enableControls(STATE_NORMAL);

    return true;
}
开发者ID:aravilife,项目名称:mythtv-stabilize2,代码行数:52,代码来源:importicons.cpp


示例17: enableControls

void CreateAccountDialog::createAccountDone(bool succeeded, const CString& errorMessage)
{
    enableControls(true);
    //
    if (succeeded)
    {
        QDialog::accept();
    }
    else
    {
        QMessageBox::critical(this, "", errorMessage);
    }
}
开发者ID:badwtg1111,项目名称:WizQTClient,代码行数:13,代码来源:wizcreateaccountdialog.cpp


示例18: AFX_MANAGE_STATE

void CMod_SellerApp::showConfigDialog() {
	AFX_MANAGE_STATE(AfxGetStaticModuleState());	
	if (!m_configDialog) {
		m_configDialog = new CConfigDialog(this);
		
		m_configDialog->Create(IDD_CONFIG);
		configToControls();
		if (m_started) disableControls();
		else enableControls();
		m_configDialog->m_enable.SetCheck(m_started);
	}
	m_configDialog->ShowWindow(SW_SHOW);
}
开发者ID:zekoman,项目名称:tibiaauto,代码行数:13,代码来源:mod_seller.cpp


示例19: displayPage

void CSearchResultDlg::onUserFound(PtrList *l)
{
	if (!l->empty()) {
		pages[pageCount++] = l;
		displayPage(++curPage);
		startUIN = ((SEARCH_RESULT *) l->back())->uin;
	} else {
		CString str;
		str.LoadString(IDS_SEARCH_NONE);
		SetDlgItemText(IDC_STATUS, str);
	}

	enableControls();
}
开发者ID:object8421,项目名称:test-1,代码行数:14,代码来源:SearchResultDlg.cpp


示例20: enableControls

void ConfigCCHWWidget::widgetsContentsChanged()
{
    ConfigTaskWidget::widgetsContentsChanged();
    if (((m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_DEBUGCONSOLE) &&
	 (m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_DEBUGCONSOLE)) ||
	((m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_DEBUGCONSOLE) &&
	 (m_telemetry->cbUsbVcp->currentIndex() == HwCopterControl::USB_VCPPORT_DEBUGCONSOLE)) ||
	((m_telemetry->cbUsbVcp->currentIndex() == HwCopterControl::USB_VCPPORT_DEBUGCONSOLE) &&
	 (m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_DEBUGCONSOLE)))
    {
        enableControls(false);
        m_telemetry->problems->setText(tr("Warning: you have configured more than one DebugConsole, this currently is not supported"));
    }
    else if (((m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_TELEMETRY) && (m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_TELEMETRY)) ||
        ((m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_GPS) && (m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_GPS)) ||
        ((m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_DEBUGCONSOLE) && (m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_DEBUGCONSOLE)) ||
        ((m_telemetry->cbTele->currentIndex() == HwCopterControl::MAINPORT_COMBRIDGE) && (m_telemetry->cbFlexi->currentIndex() == HwCopterControl::FLEXIPORT_COMBRIDGE)))
    {
        enableControls(false);
        m_telemetry->problems->setText(tr("Warning: you have configured both MainPort and FlexiPort for the same function, this currently is not supported"));
    }
    else if ((m_telemetry->cbUsbHid->currentIndex() == HwCopterControl::USB_HIDPORT_USBTELEMETRY) && (m_telemetry->cbUsbVcp->currentIndex() == HwCopterControl::USB_VCPPORT_USBTELEMETRY))
    {
        enableControls(false);
        m_telemetry->problems->setText(tr("Warning: you have configured both USB HID Port and USB VCP Port for the same function, this currently is not supported"));
    }
    else if ((m_telemetry->cbUsbHid->currentIndex() != HwCopterControl::USB_HIDPORT_USBTELEMETRY) && (m_telemetry->cbUsbVcp->currentIndex() != HwCopterControl::USB_VCPPORT_USBTELEMETRY))
    {
        enableControls(false);
        m_telemetry->problems->setText(tr("Warning: you have disabled USB Telemetry on both USB HID Port and USB VCP Port, this currently is not supported"));
    }
    else
    {
        m_telemetry->problems->setText("");
        enableControls(true);
    }
}
开发者ID:johnm1,项目名称:flyingf4_int_flash,代码行数:37,代码来源:config_cc_hw_widget.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ enableIROut函数代码示例发布时间:2022-05-30
下一篇:
C++ enableButton函数代码示例发布时间: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