本文整理汇总了C++中QCheckBox::property方法的典型用法代码示例。如果您正苦于以下问题:C++ QCheckBox::property方法的具体用法?C++ QCheckBox::property怎么用?C++ QCheckBox::property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCheckBox
的用法示例。
在下文中一共展示了QCheckBox::property方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_row_check
void ProtocolList::on_row_check(bool show)
{
QCheckBox *sc = dynamic_cast<QCheckBox*>(sender());
QVariant id = sc->property("index");
int index = id.toInt();
boost::shared_ptr<pv::data::DecoderStack> decoder_stack;
const std::vector< boost::shared_ptr<pv::view::DecodeTrace> > decode_sigs(
_session.get_decode_signals());
int cur_index = 0;
BOOST_FOREACH(boost::shared_ptr<pv::view::DecodeTrace> d, decode_sigs) {
if (cur_index == _protocol_combobox->currentIndex()) {
decoder_stack = d->decoder();
break;
}
cur_index++;
}
if (!decoder_stack)
return;
std::map<const pv::data::decode::Row, bool> rows = decoder_stack->get_rows_lshow();
for (std::map<const pv::data::decode::Row, bool>::const_iterator i = rows.begin();
i != rows.end(); i++) {
if (index-- == 0) {
decoder_stack->set_rows_lshow((*i).first, show);
break;
}
}
_session.get_decoder_model()->setDecoderStack(decoder_stack);
}
示例2: levelCheckBoxModified
void MainWindow::levelCheckBoxModified()
{
QCheckBox * checkBox = dynamic_cast<QCheckBox*>(sender());
int idx = qvariant_cast<int>(checkBox->property("idx"));
bool isVisible = checkBox->isChecked();
m_project->setLevelVisibility(idx, isVisible);
}
示例3: logSeverityChange
void MainWindow::logSeverityChange( QWidget* pWidget )
{
QCheckBox* checkbox = qobject_cast<QCheckBox*>( pWidget );
QAbstractItemModel* model = mUI.logListWidget->model();
QModelIndexList list = model->match( model->index( 0, 0 ), Qt::UserRole,
checkbox->property( "LogLevel" ), -1 );
for( QModelIndexList::iterator i = list.begin();i != list.end(); ++i )
{
model->setData( *i, checkbox->isChecked(), Qt::UserRole + 2 );
MainWindow::checkLogItem( *i );
}
if( !list.empty() ) mUI.logListWidget->scrollToBottom();
}
示例4: updateProperties
void AbstractCameraManager::updateProperties() {
AbstractCamera* selected = selectedCamera;
if( selected == NULL ) return ;
for( int i = propertiesList.topLevelItemCount()-1; i>=0; i--) {
QTreeWidgetItem* item = propertiesList.topLevelItem(i);
QCheckBox* checkBox = qobject_cast<QCheckBox*>( propertiesList.itemWidget(item, Ui::PropertyAuto) );
CameraManager::CameraProperty * prop = reinterpret_cast<CameraManager::CameraProperty*>( checkBox->property("CameraProperty").value<quintptr>() );
QSlider* slider = reinterpret_cast<QSlider*>( checkBox->property("TreeWidgetSlider").value<quintptr>() );
//qDebug() << "updating:" << prop->getName().c_str();
selected->updateProperty(prop);
item->setText(Ui::PropertyValue, prop->formatValue() );
checkBox->setChecked(prop->getAuto());
if( prop->getType() == CameraManager::AUTOTRIGGER ) continue;
slider->setValue(prop->getValueToSlider());
slider->setEnabled(!prop->getAuto());
}
}
示例5: chkBoxPressed
void RenderSettingsDialog::chkBoxPressed() {
QCheckBox *checkBox = static_cast<QCheckBox *>(sender());
setDocumentation(checkBox->property("help").toString());
}