本文整理汇总了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();
}
}
示例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();
}
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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)));
}
示例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();
}
}
示例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();
}
}
示例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();
}
示例13: updateUserSettings
void WelcomeDialog::verifyAccountDone(bool succeeded, const CString& errorMessage)
{
if (succeeded) {
updateUserSettings();
QDialog::accept();
} else {
QMessageBox::critical(this, "", errorMessage);
}
enableControls(true);
}
示例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();
}
示例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("+");
}