merge
This commit is contained in:
commit
fb0c6b9636
6 changed files with 18 additions and 17 deletions
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>304</width>
|
<width>304</width>
|
||||||
<height>32</height>
|
<height>39</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="buttonSymbols">
|
<property name="buttonSymbols">
|
||||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||||
|
|
|
@ -138,7 +138,7 @@ void CEditRangeUIntWidget::changeSlider(int value)
|
||||||
void CEditRangeUIntWidget::updateUi()
|
void CEditRangeUIntWidget::updateUi()
|
||||||
{
|
{
|
||||||
if (_Wrapper == NULL) return;
|
if (_Wrapper == NULL) return;
|
||||||
_ui.horizontalSlider->setSliderPosition(_Wrapper->get());
|
setValue(_Wrapper->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
CEditRangeIntWidget::CEditRangeIntWidget(QWidget *parent)
|
CEditRangeIntWidget::CEditRangeIntWidget(QWidget *parent)
|
||||||
|
@ -242,7 +242,7 @@ void CEditRangeIntWidget::changeSlider(int value)
|
||||||
void CEditRangeIntWidget::updateUi()
|
void CEditRangeIntWidget::updateUi()
|
||||||
{
|
{
|
||||||
if (_Wrapper == NULL) return;
|
if (_Wrapper == NULL) return;
|
||||||
_ui.horizontalSlider->setSliderPosition(_Wrapper->get());
|
setValue(_Wrapper->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -254,6 +254,7 @@ CEditRangeFloatWidget::CEditRangeFloatWidget(QWidget *parent )
|
||||||
connect(_ui.startSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeRange()));
|
connect(_ui.startSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeRange()));
|
||||||
connect(_ui.endSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeRange()));
|
connect(_ui.endSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeRange()));
|
||||||
connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(changeSlider(int)));
|
connect(_ui.horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(changeSlider(int)));
|
||||||
|
connect(_ui.currentSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeValue(double)));
|
||||||
|
|
||||||
setValue(0.0, false);
|
setValue(0.0, false);
|
||||||
}
|
}
|
||||||
|
@ -304,6 +305,7 @@ void CEditRangeFloatWidget::enableUpperBound(float upperBound, bool upperBoundEx
|
||||||
upperBound -= 0.001f;
|
upperBound -= 0.001f;
|
||||||
_ui.endSpinBox->setMaximum(upperBound);
|
_ui.endSpinBox->setMaximum(upperBound);
|
||||||
_ui.startSpinBox->setMaximum(upperBound);
|
_ui.startSpinBox->setMaximum(upperBound);
|
||||||
|
_ui.currentSpinBox->setMaximum(upperBound);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditRangeFloatWidget::enableLowerBound(float lowerBound, bool lowerBoundExcluded)
|
void CEditRangeFloatWidget::enableLowerBound(float lowerBound, bool lowerBoundExcluded)
|
||||||
|
@ -312,6 +314,7 @@ void CEditRangeFloatWidget::enableLowerBound(float lowerBound, bool lowerBoundEx
|
||||||
lowerBound += 0.01f;
|
lowerBound += 0.01f;
|
||||||
_ui.endSpinBox->setMinimum(lowerBound);
|
_ui.endSpinBox->setMinimum(lowerBound);
|
||||||
_ui.startSpinBox->setMinimum(lowerBound);
|
_ui.startSpinBox->setMinimum(lowerBound);
|
||||||
|
_ui.currentSpinBox->setMinimum(lowerBound);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditRangeFloatWidget::disableUpperBound(void)
|
void CEditRangeFloatWidget::disableUpperBound(void)
|
||||||
|
@ -338,8 +341,11 @@ void CEditRangeFloatWidget::changeSlider(int value)
|
||||||
float delta = _ui.endSpinBox->value() - _ui.startSpinBox->value();
|
float delta = _ui.endSpinBox->value() - _ui.startSpinBox->value();
|
||||||
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
|
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
|
||||||
float newValue = _ui.startSpinBox->value() + ((delta / deltaSlider) * value);
|
float newValue = _ui.startSpinBox->value() + ((delta / deltaSlider) * value);
|
||||||
_ui.currentSpinBox->setValue(newValue);
|
|
||||||
|
|
||||||
|
_ui.currentSpinBox->blockSignals(true);
|
||||||
|
_ui.currentSpinBox->setValue(newValue);
|
||||||
|
_ui.currentSpinBox->blockSignals(false);
|
||||||
|
|
||||||
// NeL wrapper
|
// NeL wrapper
|
||||||
if ((_Wrapper != NULL) && (fabs(newValue - _Wrapper->get()) > 0.0001))
|
if ((_Wrapper != NULL) && (fabs(newValue - _Wrapper->get()) > 0.0001))
|
||||||
_Wrapper->setAndUpdateModifiedFlag(newValue);
|
_Wrapper->setAndUpdateModifiedFlag(newValue);
|
||||||
|
@ -348,14 +354,15 @@ void CEditRangeFloatWidget::changeSlider(int value)
|
||||||
Q_EMIT valueChanged(newValue);
|
Q_EMIT valueChanged(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEditRangeFloatWidget::changeValue(double value)
|
||||||
|
{
|
||||||
|
setValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
void CEditRangeFloatWidget::updateUi()
|
void CEditRangeFloatWidget::updateUi()
|
||||||
{
|
{
|
||||||
if (_Wrapper == NULL) return;
|
if (_Wrapper == NULL) return;
|
||||||
_ui.currentSpinBox->setValue(_Wrapper->get());
|
setValue(_Wrapper->get());
|
||||||
float delta = _ui.endSpinBox->value() - _ui.startSpinBox->value();
|
|
||||||
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
|
|
||||||
int newValue = floor((deltaSlider / delta) * (_Wrapper->get() - _ui.startSpinBox->value()));
|
|
||||||
_ui.horizontalSlider->setSliderPosition(newValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace NLQT */
|
} /* namespace NLQT */
|
||||||
|
|
|
@ -277,6 +277,7 @@ Q_SIGNALS:
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void changeRange();
|
void changeRange();
|
||||||
void changeSlider(int value);
|
void changeSlider(int value);
|
||||||
|
void changeValue(double value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
#include "interface_v3/action_handler.h"
|
#include "interface_v3/action_handler.h"
|
||||||
#include "sound_manager.h"
|
#include "sound_manager.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "interface_v3/custom_mouse.h"
|
|
||||||
#include "login.h"
|
#include "login.h"
|
||||||
#include "login_progress_post_thread.h"
|
#include "login_progress_post_thread.h"
|
||||||
|
|
||||||
|
@ -287,12 +286,10 @@ void setOutGameFullScreen()
|
||||||
/*
|
/*
|
||||||
InitMouseWithCursor (true);
|
InitMouseWithCursor (true);
|
||||||
Driver->showCursor(false);
|
Driver->showCursor(false);
|
||||||
CustomMouse.updateCursor(true); // force a rebuild (may be due to fullscreen, but hotspot broken else ...)
|
|
||||||
Driver->showCursor(true);
|
Driver->showCursor(true);
|
||||||
Driver->clearBuffers(CRGBA::Black);
|
Driver->clearBuffers(CRGBA::Black);
|
||||||
Driver->swapBuffers();
|
Driver->swapBuffers();
|
||||||
Driver->showCursor(false);
|
Driver->showCursor(false);
|
||||||
CustomMouse.updateCursor(true); // force a rebuild (may be due to fullscreen, but hotspot broken else ...)
|
|
||||||
Driver->showCursor(true);
|
Driver->showCursor(true);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include "time_client.h"
|
#include "time_client.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "interface_v3/interface_manager.h"
|
#include "interface_v3/interface_manager.h"
|
||||||
#include "interface_v3/custom_mouse.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include "release.h"
|
#include "release.h"
|
||||||
#include "net_manager.h"
|
#include "net_manager.h"
|
||||||
#include "client_cfg.h"
|
#include "client_cfg.h"
|
||||||
#include "interface_v3/custom_mouse.h"
|
|
||||||
#include "bg_downloader_access.h"
|
#include "bg_downloader_access.h"
|
||||||
#include "nel/misc/system_utils.h"
|
#include "nel/misc/system_utils.h"
|
||||||
|
|
||||||
|
@ -161,7 +160,6 @@ void drawLoadingBitmap (float progress)
|
||||||
|
|
||||||
void CProgress::internalProgress (float value)
|
void CProgress::internalProgress (float value)
|
||||||
{
|
{
|
||||||
//CustomMouse.updateCursor();
|
|
||||||
// Get croped value
|
// Get croped value
|
||||||
value = getCropedValue (value);
|
value = getCropedValue (value);
|
||||||
|
|
||||||
|
@ -396,7 +394,6 @@ void CProgress::internalProgress (float value)
|
||||||
// \todo GUIGUI : Remove this when possible.
|
// \todo GUIGUI : Remove this when possible.
|
||||||
NetMngr.update();
|
NetMngr.update();
|
||||||
CCDBNodeBranch::flushObserversCalls();
|
CCDBNodeBranch::flushObserversCalls();
|
||||||
//CustomMouse.updateCursor();
|
|
||||||
|
|
||||||
// update system dependent progress bar
|
// update system dependent progress bar
|
||||||
static uint previousValue = 0;
|
static uint previousValue = 0;
|
||||||
|
|
Loading…
Reference in a new issue