当前位置: 首页>>代码示例>>C++>>正文


C++ enableControls函数代码示例

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


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


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