本文整理汇总了C++中QSlider::move方法的典型用法代码示例。如果您正苦于以下问题:C++ QSlider::move方法的具体用法?C++ QSlider::move怎么用?C++ QSlider::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSlider
的用法示例。
在下文中一共展示了QSlider::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: placeWidgets
void KMix::placeWidgets()
{
int sliderHeight=100;
int qsMaxY=0;
int ix = 0;
int iy = 0;
QSlider *qs;
QLabel *qb;
// Place Sliders (Volume indicators)
ix = 0;
if (mainmenuOn)
mainmenu->show();
else
mainmenu->hide();
bool first = true;
MixDevice *MixPtr = mix->First;
while (MixPtr) {
if (MixPtr->is_disabled) {
MixPtr->picLabel->hide();
MixPtr->Left->slider->hide();
if (MixPtr->is_stereo)
MixPtr->Right->slider->hide();
MixPtr=MixPtr->Next;
continue;
}
if ( !first ) ix += 6;
else ix += 4; // On first loop add 4
int old_x=ix;
qb = MixPtr->picLabel;
// left slider
qs = MixPtr->Left->slider;
if (tickmarksOn) {
qs->setTickmarks(QSlider::Left);
qs->setTickInterval(10);
}
else
qs->setTickmarks(QSlider::NoMarks);
QSize VolSBsize = qs->sizeHint();
qs->setValue(100-MixPtr->Left->volume);
qs->setGeometry( ix, iy+qb->height(), VolSBsize.width(), sliderHeight);
qs->move(ix,iy+qb->height());
qs->show();
// Its a good point to find out the maximum y pos of the slider right here
if (first)
qsMaxY = qs->y()+qs->height();
ix += qs->width();
// But make sure it isn't linked to the left channel.
bool BothSliders =
(MixPtr->is_stereo == true ) &&
(MixPtr->StereoLink == false);
QString ToolTipString;
ToolTipString = MixPtr->name();
if ( BothSliders)
ToolTipString += " (Left)";
QToolTip::add( qs, ToolTipString );
// Mark record source(s) and muted channel(s). This is done by ordinary
// color marks on the slider, but this will be changed by red and green
// and black "bullets" below the slider. TODO !!!
if (MixPtr->is_recsrc)
qs->setBackgroundColor( red );
else {
if (MixPtr->is_muted)
qs->setBackgroundColor( black );
else
qs->setBackgroundColor( colorGroup().mid() );
}
if (MixPtr->is_stereo == true) {
qs = MixPtr->Right->slider;
if (MixPtr->StereoLink == false) {
// Show right slider
if (tickmarksOn) {
qs->setTickmarks(QSlider::Right);
qs->setTickInterval(10);
}
else
qs->setTickmarks(QSlider::NoMarks);
QSize VolSBsize = qs->sizeHint();
qs->setValue(100-MixPtr->Right->volume);
qs->setGeometry( ix, iy+qb->height(), VolSBsize.width(), sliderHeight);
ix += qs->width();
ToolTipString = MixPtr->name();
//.........这里部分代码省略.........