本文整理汇总了C++中TimeSlider类的典型用法代码示例。如果您正苦于以下问题:C++ TimeSlider类的具体用法?C++ TimeSlider怎么用?C++ TimeSlider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TimeSlider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createdWidgets
void MyWidgetAction::propagate_enabled(bool b) {
QList<QWidget *> l = createdWidgets();
for (int n=0; n < l.count(); n++) {
TimeSlider *s = (TimeSlider*) l[n];
s->setEnabled(b);;
}
setEnabled(b);
}
示例2: TimeSlider
QWidget * TimeSliderAction::createWidget ( QWidget * parent ) {
TimeSlider *t = new TimeSlider(parent);
t->setEnabled( isEnabled() );
if (custom_style) t->setStyle(custom_style);
if (!custom_stylesheet.isEmpty()) t->setStyleSheet(custom_stylesheet);
connect( t, SIGNAL(posChanged(int)),
this, SIGNAL(posChanged(int)) );
connect( t, SIGNAL(draggingPos(int)),
this, SIGNAL(draggingPos(int)) );
#if ENABLE_DELAYED_DRAGGING
t->setDragDelay(drag_delay);
connect( t, SIGNAL(delayedDraggingPos(int)),
this, SIGNAL(delayedDraggingPos(int)) );
#endif
return t;
}
示例3: screen
void
FadeView::UpdateTurnOffScreen()
{
bool enabled = (fSettings.TimeFlags() & ENABLE_DPMS_MASK) != 0;
BScreen screen(Window());
uint32 dpmsCapabilities = screen.DPMSCapabilites();
fTurnOffScreenFlags = 0;
if (dpmsCapabilities & B_DPMS_OFF)
fTurnOffScreenFlags |= ENABLE_DPMS_OFF;
if (dpmsCapabilities & B_DPMS_STAND_BY)
fTurnOffScreenFlags |= ENABLE_DPMS_STAND_BY;
if (dpmsCapabilities & B_DPMS_SUSPEND)
fTurnOffScreenFlags |= ENABLE_DPMS_SUSPEND;
fTurnOffCheckBox->SetValue(enabled && fTurnOffScreenFlags != 0
? B_CONTROL_ON : B_CONTROL_OFF);
enabled = fEnableCheckBox->Value() == B_CONTROL_ON;
fTurnOffCheckBox->SetEnabled(enabled && fTurnOffScreenFlags != 0);
if (fTurnOffScreenFlags != 0) {
fTurnOffNotSupported->Hide();
fTurnOffSlider->Show();
} else {
fTurnOffSlider->Hide();
fTurnOffNotSupported->Show();
}
}
示例4:
void
FadeView::UpdateStatus()
{
Window()->DisableUpdates();
bool enabled = fEnableCheckBox->Value() == B_CONTROL_ON;
fPasswordCheckBox->SetEnabled(enabled);
fTurnOffCheckBox->SetEnabled(enabled && fTurnOffScreenFlags != 0);
fRunSlider->SetEnabled(enabled);
fTurnOffSlider->SetEnabled(enabled && fTurnOffCheckBox->Value());
fPasswordSlider->SetEnabled(enabled && fPasswordCheckBox->Value());
fPasswordButton->SetEnabled(enabled && fPasswordCheckBox->Value());
Window()->EnableUpdates();
// Update the saved preferences
fSettings.SetWindowFrame(Frame());
fSettings.SetTimeFlags((enabled ? ENABLE_SAVER : 0)
| (fTurnOffCheckBox->Value() ? fTurnOffScreenFlags : 0));
fSettings.SetBlankTime(fRunSlider->Time());
bigtime_t offTime = fTurnOffSlider->Time() - fSettings.BlankTime();
fSettings.SetOffTime(offTime);
fSettings.SetSuspendTime(offTime);
fSettings.SetStandByTime(offTime);
fSettings.SetBlankCorner(fFadeNow->Corner());
fSettings.SetNeverBlankCorner(fFadeNever->Corner());
fSettings.SetLockEnable(fPasswordCheckBox->Value());
fSettings.SetPasswordTime(fPasswordSlider->Time());
// TODO - Tell the password window to update its stuff
}
示例5:
void
FadeView::AttachedToWindow()
{
fEnableCheckBox->SetTarget(this);
fRunSlider->SetTarget(this);
fTurnOffCheckBox->SetTarget(this);
fTurnOffSlider->SetTarget(this);
fFadeNow->SetTarget(this);
fFadeNever->SetTarget(this);
fPasswordCheckBox->SetTarget(this);
fPasswordSlider->SetTarget(this);
fEnableCheckBox->SetValue(
fSettings.TimeFlags() & ENABLE_SAVER ? B_CONTROL_ON : B_CONTROL_OFF);
fRunSlider->SetTime(fSettings.BlankTime());
fTurnOffSlider->SetTime(fSettings.OffTime() + fSettings.BlankTime());
fFadeNow->SetCorner(fSettings.BlankCorner());
fFadeNever->SetCorner(fSettings.NeverBlankCorner());
fPasswordCheckBox->SetValue(fSettings.LockEnable());
fPasswordSlider->SetTime(fSettings.PasswordTime());
_UpdateColors();
UpdateTurnOffScreen();
UpdateStatus();
}