本文整理汇总了C++中MonitorInfo::backlight方法的典型用法代码示例。如果您正苦于以下问题:C++ MonitorInfo::backlight方法的具体用法?C++ MonitorInfo::backlight怎么用?C++ MonitorInfo::backlight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonitorInfo
的用法示例。
在下文中一共展示了MonitorInfo::backlight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setRevertedValues
void OutputWidget::setRevertedValues(const MonitorInfo & monitor)
{
if (mMonitor.id() == monitor.id() && mMonitor.name() == monitor.name())
{
ui->backlightSlider->blockSignals(true);
ui->backlightSlider->setValue(monitor.backlight());
ui->backlightSlider->blockSignals(false);
ui->brightnessSlider->blockSignals(true);
ui->brightnessSlider->setValue(monitor.brightness()*100);
ui->brightnessSlider->blockSignals(false);
}
}
示例2: mMonitor
OutputWidget::OutputWidget(MonitorInfo monitor, QWidget *parent):QWidget(parent), mMonitor(monitor)
{
ui = new Ui::OutputWidget();
ui->setupUi(this);
ui->label->setText("<b>"+monitor.name()+":</b>");
if ( monitor.isBacklightSupported() )
{
ui->backlightSlider->setMinimum(0);
ui->backlightSlider->setMaximum(monitor.backlightMax());
ui->backlightSlider->setValue(monitor.backlight());
ui->backlightSlider->setFocus(Qt::OtherFocusReason);
}
else
ui->backlightSlider->hide();
ui->brightnessSlider->setMinimum(0);
ui->brightnessSlider->setMaximum(200);
ui->brightnessSlider->setValue(monitor.brightness()*100);
connect(ui->backlightSlider, SIGNAL(valueChanged(int)), this, SLOT(backlightChanged(int)));
connect(ui->brightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(brightnessChanged(int)));
}