Use english words in code and interface.
svn path=/trunk/KDE/kdebase/workspace/; revision=799110
This commit is contained in:
parent
e46fbb1445
commit
e4ecf50281
6 changed files with 106 additions and 90 deletions
|
@ -45,8 +45,8 @@ WobblyWindowsEffect::WobblyWindowsEffect()
|
|||
{
|
||||
KConfigGroup conf = effects->effectConfig("Wobbly");
|
||||
|
||||
m_raideur = conf.readEntry("Raideur", RAIDEUR);
|
||||
m_amortissement = conf.readEntry("Amortissement", AMORTISSEMENT);
|
||||
m_stiffness = conf.readEntry("Stiffness", STIFFNESS);
|
||||
m_drag = conf.readEntry("Drag", DRAG);
|
||||
m_move_factor = conf.readEntry("MoveFactor", MOVEFACTOR);
|
||||
|
||||
m_xTesselation = conf.readEntry("XTesselation", XTESSELATION);
|
||||
|
@ -115,7 +115,7 @@ WobblyWindowsEffect::WobblyWindowsEffect()
|
|||
#if defined VERBOSE_MODE
|
||||
kDebug() << "Parameters :\n" <<
|
||||
"move : " << m_moveEffectEnabled << ", open : " << m_openEffectEnabled << ", close : " << m_closeEffectEnabled << "\n"
|
||||
"grid(" << m_raideur << ", " << m_amortissement << ", " << m_move_factor << ")\n" <<
|
||||
"grid(" << m_stiffness << ", " << m_drag << ", " << m_move_factor << ")\n" <<
|
||||
"velocity(" << m_minVelocity << ", " << m_maxVelocity << ", " << m_stopVelocity << ")\n" <<
|
||||
"acceleration(" << m_minAcceleration << ", " << m_maxAcceleration << ", " << m_stopAcceleration << ")\n" <<
|
||||
"tesselation(" << m_xTesselation << ", " << m_yTesselation << ")";
|
||||
|
@ -147,9 +147,9 @@ void WobblyWindowsEffect::setMoveFactor(qreal factor)
|
|||
m_move_factor = factor;
|
||||
}
|
||||
|
||||
void WobblyWindowsEffect::setRaideur(qreal m_raideur)
|
||||
void WobblyWindowsEffect::setStiffness(qreal stiffness)
|
||||
{
|
||||
this->m_raideur = m_raideur;
|
||||
m_stiffness = stiffness;
|
||||
}
|
||||
|
||||
void WobblyWindowsEffect::setVelocityFilter(GridFilter filter)
|
||||
|
@ -172,9 +172,9 @@ WobblyWindowsEffect::GridFilter WobblyWindowsEffect::accelerationFilter() const
|
|||
return m_accelerationFilter;
|
||||
}
|
||||
|
||||
void WobblyWindowsEffect::setAmortissement(qreal m_amortissement)
|
||||
void WobblyWindowsEffect::setDrag(qreal drag)
|
||||
{
|
||||
this->m_amortissement = m_amortissement;
|
||||
m_drag = drag;
|
||||
}
|
||||
|
||||
void WobblyWindowsEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||
|
@ -629,7 +629,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[0];
|
||||
Pair current_pos = wwi.position[0];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[0] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -638,8 +638,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[0] = wwi.position[1];
|
||||
neibourgs[1] = wwi.position[wwi.width];
|
||||
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_raideur + (neibourgs[1].x - pos.x)*m_raideur;
|
||||
acceleration.y = ((neibourgs[1].y - pos.y) - y_length)*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness;
|
||||
acceleration.y = ((neibourgs[1].y - pos.y) - y_length)*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 2;
|
||||
acceleration.y /= 2;
|
||||
|
@ -654,7 +654,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[wwi.width-1];
|
||||
Pair current_pos = wwi.position[wwi.width-1];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[wwi.width-1] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -663,8 +663,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[0] = wwi.position[wwi.width-2];
|
||||
neibourgs[1] = wwi.position[2*wwi.width-1];
|
||||
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_raideur + (neibourgs[1].x - pos.x)*m_raideur;
|
||||
acceleration.y = ((neibourgs[1].y - pos.y) - y_length)*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness;
|
||||
acceleration.y = ((neibourgs[1].y - pos.y) - y_length)*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 2;
|
||||
acceleration.y /= 2;
|
||||
|
@ -679,7 +679,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[wwi.width*(wwi.height-1)];
|
||||
Pair current_pos = wwi.position[wwi.width*(wwi.height-1)];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[wwi.width*(wwi.height-1)] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -688,8 +688,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[0] = wwi.position[wwi.width*(wwi.height-1)+1];
|
||||
neibourgs[1] = wwi.position[wwi.width*(wwi.height-2)];
|
||||
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_raideur + (neibourgs[1].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 2;
|
||||
acceleration.y /= 2;
|
||||
|
@ -704,7 +704,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[wwi.count-1];
|
||||
Pair current_pos = wwi.position[wwi.count-1];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[wwi.count-1] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -713,8 +713,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[0] = wwi.position[wwi.count-2];
|
||||
neibourgs[1] = wwi.position[wwi.width*(wwi.height-1)-1];
|
||||
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_raideur + (neibourgs[1].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 2;
|
||||
acceleration.y /= 2;
|
||||
|
@ -733,7 +733,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[i];
|
||||
Pair current_pos = wwi.position[i];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[i] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -743,8 +743,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[1] = wwi.position[i+1];
|
||||
neibourgs[2] = wwi.position[i+wwi.width];
|
||||
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_raideur + ((neibourgs[1].x - pos.x) - x_length)*m_raideur + (neibourgs[2].x - pos.x)*m_raideur;
|
||||
acceleration.y = ((neibourgs[2].y - pos.y) - y_length)*m_raideur + (neibourgs[0].y - pos.y)*m_raideur + (neibourgs[1].y - pos.y)*m_raideur;
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_stiffness + ((neibourgs[1].x - pos.x) - x_length)*m_stiffness + (neibourgs[2].x - pos.x)*m_stiffness;
|
||||
acceleration.y = ((neibourgs[2].y - pos.y) - y_length)*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness + (neibourgs[1].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 3;
|
||||
acceleration.y /= 3;
|
||||
|
@ -761,7 +761,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[i];
|
||||
Pair current_pos = wwi.position[i];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[i] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -771,8 +771,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[1] = wwi.position[i+1];
|
||||
neibourgs[2] = wwi.position[i-wwi.width];
|
||||
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_raideur + ((neibourgs[1].x - pos.x) - x_length)*m_raideur + (neibourgs[2].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[2].y))*m_raideur + (neibourgs[0].y - pos.y)*m_raideur + (neibourgs[1].y - pos.y)*m_raideur;
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_stiffness + ((neibourgs[1].x - pos.x) - x_length)*m_stiffness + (neibourgs[2].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[2].y))*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness + (neibourgs[1].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 3;
|
||||
acceleration.y /= 3;
|
||||
|
@ -789,7 +789,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[i];
|
||||
Pair current_pos = wwi.position[i];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[i] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -799,8 +799,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[1] = wwi.position[i-wwi.width];
|
||||
neibourgs[2] = wwi.position[i+wwi.width];
|
||||
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_raideur + (neibourgs[1].x - pos.x)*m_raideur + (neibourgs[2].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_raideur + ((neibourgs[2].y - pos.y) - y_length)*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness + (neibourgs[2].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_stiffness + ((neibourgs[2].y - pos.y) - y_length)*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 3;
|
||||
acceleration.y /= 3;
|
||||
|
@ -817,7 +817,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[i];
|
||||
Pair current_pos = wwi.position[i];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[i] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -827,8 +827,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[1] = wwi.position[i-wwi.width];
|
||||
neibourgs[2] = wwi.position[i+wwi.width];
|
||||
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_raideur + (neibourgs[1].x - pos.x)*m_raideur + (neibourgs[2].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_raideur + ((neibourgs[2].y - pos.y) - y_length)*m_raideur + (neibourgs[0].y - pos.y)*m_raideur;
|
||||
acceleration.x = (x_length - (pos.x - neibourgs[0].x))*m_stiffness + (neibourgs[1].x - pos.x)*m_stiffness + (neibourgs[2].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[1].y))*m_stiffness + ((neibourgs[2].y - pos.y) - y_length)*m_stiffness + (neibourgs[0].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 3;
|
||||
acceleration.y /= 3;
|
||||
|
@ -849,7 +849,7 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
Pair window_pos = wwi.origin[index];
|
||||
Pair current_pos = wwi.position[index];
|
||||
Pair move = {window_pos.x - current_pos.x, window_pos.y - current_pos.y};
|
||||
Pair accel = {move.x*m_raideur, move.y*m_raideur};
|
||||
Pair accel = {move.x*m_stiffness, move.y*m_stiffness};
|
||||
wwi.acceleration[index] = accel;
|
||||
}
|
||||
else
|
||||
|
@ -860,14 +860,14 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
neibourgs[2] = wwi.position[index-wwi.width];
|
||||
neibourgs[3] = wwi.position[index+wwi.width];
|
||||
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_raideur +
|
||||
(x_length - (pos.x - neibourgs[1].x))*m_raideur +
|
||||
(neibourgs[2].x - pos.x)*m_raideur +
|
||||
(neibourgs[3].x - pos.x)*m_raideur;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[2].y))*m_raideur +
|
||||
((neibourgs[3].y - pos.y) - y_length)*m_raideur +
|
||||
(neibourgs[0].y - pos.y)*m_raideur +
|
||||
(neibourgs[1].y - pos.y)*m_raideur;
|
||||
acceleration.x = ((neibourgs[0].x - pos.x) - x_length)*m_stiffness +
|
||||
(x_length - (pos.x - neibourgs[1].x))*m_stiffness +
|
||||
(neibourgs[2].x - pos.x)*m_stiffness +
|
||||
(neibourgs[3].x - pos.x)*m_stiffness;
|
||||
acceleration.y = (y_length - (pos.y - neibourgs[2].y))*m_stiffness +
|
||||
((neibourgs[3].y - pos.y) - y_length)*m_stiffness +
|
||||
(neibourgs[0].y - pos.y)*m_stiffness +
|
||||
(neibourgs[1].y - pos.y)*m_stiffness;
|
||||
|
||||
acceleration.x /= 4;
|
||||
acceleration.y /= 4;
|
||||
|
@ -914,8 +914,8 @@ bool WobblyWindowsEffect::updateWindowWobblyDatas(EffectWindow* w, qreal time)
|
|||
#endif
|
||||
|
||||
Pair& vel = wwi.velocity[i];
|
||||
vel.x = acc.x*time + vel.x*m_amortissement;
|
||||
vel.y = acc.y*time + vel.y*m_amortissement;
|
||||
vel.x = acc.x*time + vel.x*m_drag;
|
||||
vel.y = acc.y*time + vel.y*m_drag;
|
||||
|
||||
acc_sum += fabs(acc.x) + fabs(acc.y);
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ class WobblyWindowsEffect : public Effect
|
|||
virtual void windowClosed( EffectWindow* w );
|
||||
|
||||
// Wobbly model parameters
|
||||
void setRaideur(qreal raideur);
|
||||
void setAmortissement(qreal amortissement);
|
||||
void setStiffness(qreal stiffness);
|
||||
void setDrag(qreal drag);
|
||||
void setVelocityThreshold(qreal velocityThreshold);
|
||||
void setMoveFactor(qreal factor);
|
||||
|
||||
|
@ -105,8 +105,8 @@ class WobblyWindowsEffect : public Effect
|
|||
|
||||
QRect m_updateRegion;
|
||||
|
||||
qreal m_raideur;
|
||||
qreal m_amortissement;
|
||||
qreal m_stiffness;
|
||||
qreal m_drag;
|
||||
qreal m_move_factor;
|
||||
|
||||
// the default tesselation for windows
|
||||
|
|
|
@ -43,10 +43,10 @@ KCModule(EffectFactory::componentData(), parent, args)
|
|||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
connect(m_ui.spRaideur, SIGNAL(valueChanged(double)), this, SLOT(slotSpRaideur(double)));
|
||||
connect(m_ui.slRaideur, SIGNAL(sliderMoved(int)), this, SLOT(slotSlRaideur(int)));
|
||||
connect(m_ui.spAmortissement, SIGNAL(valueChanged(double)), this, SLOT(slotSpAmortissement(double)));
|
||||
connect(m_ui.slAmortissement, SIGNAL(sliderMoved(int)), this, SLOT(slotSlAmortissement(int)));
|
||||
connect(m_ui.spStiffness, SIGNAL(valueChanged(double)), this, SLOT(slotSpStiffness(double)));
|
||||
connect(m_ui.slStiffness, SIGNAL(sliderMoved(int)), this, SLOT(slotSlStiffness(int)));
|
||||
connect(m_ui.spDrag, SIGNAL(valueChanged(double)), this, SLOT(slotSpDrag(double)));
|
||||
connect(m_ui.slDrag, SIGNAL(sliderMoved(int)), this, SLOT(slotSlDrag(int)));
|
||||
connect(m_ui.spMovFactor, SIGNAL(valueChanged(double)), this, SLOT(slotSpMovFactor(double)));
|
||||
connect(m_ui.slMovFactor, SIGNAL(sliderMoved(int)), this, SLOT(slotSlMovFactor(int)));
|
||||
|
||||
|
@ -82,15 +82,15 @@ void WobblyWindowsEffectConfig::load()
|
|||
KCModule::load();
|
||||
|
||||
KConfigGroup conf = EffectsHandler::effectConfig("Wobbly");
|
||||
qreal raideur = conf.readEntry("Raideur", RAIDEUR);
|
||||
qreal amortissement = conf.readEntry("Amortissement", AMORTISSEMENT);
|
||||
qreal stiffness = conf.readEntry("Stiffness", STIFFNESS);
|
||||
qreal drag = conf.readEntry("Drag", DRAG);
|
||||
qreal move_factor = conf.readEntry("MoveFactor", MOVEFACTOR);
|
||||
|
||||
m_ui.spRaideur->setValue(raideur);
|
||||
m_ui.slRaideur->setSliderPosition(raideur*50);
|
||||
m_ui.spStiffness->setValue(stiffness);
|
||||
m_ui.slStiffness->setSliderPosition(stiffness*50);
|
||||
|
||||
m_ui.spAmortissement->setValue(amortissement);
|
||||
m_ui.slAmortissement->setSliderPosition(amortissement*100);
|
||||
m_ui.spDrag->setValue(drag);
|
||||
m_ui.slDrag->setSliderPosition(drag*100);
|
||||
|
||||
m_ui.spMovFactor->setValue(move_factor);
|
||||
m_ui.slMovFactor->setValue(move_factor*100);
|
||||
|
@ -177,8 +177,8 @@ void WobblyWindowsEffectConfig::save()
|
|||
{
|
||||
KConfigGroup conf = EffectsHandler::effectConfig("Wobbly");
|
||||
|
||||
conf.writeEntry("Raideur", m_ui.spRaideur->value());
|
||||
conf.writeEntry("Amortissement", m_ui.spAmortissement->value());
|
||||
conf.writeEntry("Stiffness", m_ui.spStiffness->value());
|
||||
conf.writeEntry("Drag", m_ui.spDrag->value());
|
||||
conf.writeEntry("MoveFactor", m_ui.spMovFactor->value());
|
||||
|
||||
conf.writeEntry("XTesselation", m_ui.spHNodes->value());
|
||||
|
@ -237,11 +237,11 @@ void WobblyWindowsEffectConfig::save()
|
|||
|
||||
void WobblyWindowsEffectConfig::defaults()
|
||||
{
|
||||
m_ui.spRaideur->setValue(RAIDEUR);
|
||||
m_ui.slRaideur->setSliderPosition(RAIDEUR*50);
|
||||
m_ui.spStiffness->setValue(STIFFNESS);
|
||||
m_ui.slStiffness->setSliderPosition(STIFFNESS*50);
|
||||
|
||||
m_ui.spAmortissement->setValue(AMORTISSEMENT);
|
||||
m_ui.slAmortissement->setSliderPosition(AMORTISSEMENT*100);
|
||||
m_ui.spDrag->setValue(DRAG);
|
||||
m_ui.slDrag->setSliderPosition(DRAG*100);
|
||||
|
||||
m_ui.spMovFactor->setValue(MOVEFACTOR);
|
||||
m_ui.slMovFactor->setValue(MOVEFACTOR*100);
|
||||
|
@ -274,27 +274,27 @@ void WobblyWindowsEffectConfig::defaults()
|
|||
emit changed(true);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::slotSpRaideur(double value)
|
||||
void WobblyWindowsEffectConfig::slotSpStiffness(double value)
|
||||
{
|
||||
m_ui.slRaideur->setSliderPosition(value*50);
|
||||
m_ui.slStiffness->setSliderPosition(value*50);
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::slotSlRaideur(int value)
|
||||
void WobblyWindowsEffectConfig::slotSlStiffness(int value)
|
||||
{
|
||||
m_ui.spRaideur->setValue(value/50.0);
|
||||
m_ui.spStiffness->setValue(value/50.0);
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::slotSpAmortissement(double value)
|
||||
void WobblyWindowsEffectConfig::slotSpDrag(double value)
|
||||
{
|
||||
m_ui.slAmortissement->setSliderPosition(value*100);
|
||||
m_ui.slDrag->setSliderPosition(value*100);
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
void WobblyWindowsEffectConfig::slotSlAmortissement(int value)
|
||||
void WobblyWindowsEffectConfig::slotSlDrag(int value)
|
||||
{
|
||||
m_ui.spAmortissement->setValue(qreal(value)/100.0);
|
||||
m_ui.spDrag->setValue(qreal(value)/100.0);
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ private:
|
|||
|
||||
private slots:
|
||||
|
||||
void slotSpRaideur(double);
|
||||
void slotSlRaideur(int);
|
||||
void slotSpAmortissement(double);
|
||||
void slotSlAmortissement(int);
|
||||
void slotSpStiffness(double);
|
||||
void slotSlStiffness(int);
|
||||
void slotSpDrag(double);
|
||||
void slotSlDrag(int);
|
||||
void slotSpMovFactor(double);
|
||||
void slotSlMovFactor(int);
|
||||
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>533</width>
|
||||
<height>338</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Grid Parameters</string>
|
||||
</attribute>
|
||||
|
@ -96,7 +104,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -105,7 +113,7 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QDoubleSpinBox" name="spRaideur" >
|
||||
<widget class="QDoubleSpinBox" name="spStiffness" >
|
||||
<property name="maximum" >
|
||||
<double>2.000000000000000</double>
|
||||
</property>
|
||||
|
@ -118,7 +126,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
<widget class="QSlider" name="slRaideur" >
|
||||
<widget class="QSlider" name="slStiffness" >
|
||||
<property name="maximum" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
|
@ -140,7 +148,7 @@
|
|||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_4" >
|
||||
<property name="text" >
|
||||
<string>Amortissement:</string>
|
||||
<string>Drag:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -149,7 +157,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -158,7 +166,7 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QDoubleSpinBox" name="spAmortissement" >
|
||||
<widget class="QDoubleSpinBox" name="spDrag" >
|
||||
<property name="maximum" >
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
|
@ -171,7 +179,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3" >
|
||||
<widget class="QSlider" name="slAmortissement" >
|
||||
<widget class="QSlider" name="slDrag" >
|
||||
<property name="maximum" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
|
@ -202,7 +210,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>20</height>
|
||||
|
@ -305,6 +313,14 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>533</width>
|
||||
<height>338</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Thresholds</string>
|
||||
</attribute>
|
||||
|
@ -327,7 +343,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -380,7 +396,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -433,7 +449,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -488,7 +504,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -541,7 +557,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>20</height>
|
||||
|
@ -594,7 +610,7 @@
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>20</height>
|
||||
|
|
|
@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <QtGlobal>
|
||||
|
||||
static const qreal RAIDEUR = 0.06;
|
||||
static const qreal AMORTISSEMENT = 0.92;
|
||||
static const qreal STIFFNESS = 0.06;
|
||||
static const qreal DRAG = 0.92;
|
||||
static const qreal MOVEFACTOR = 0.1;
|
||||
|
||||
static const int XTESSELATION = 20;
|
||||
|
|
Loading…
Reference in a new issue