Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 430e6351 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Bug fixed in UIParamByteSize.

parent 5a1cd820
/*
* (c) LSIIT, UMR CNRS/UdS
* Authors: F. Larue.
*
* See licence.txt for additional information.
*/
#include "UIParamByteSize.h"
#include "ByteSizeInputWidget.h"
UIParamByteSize::UIParamByteSize( const QString& id,
const QString& name,
const QString& description,
uint64_t value ) :
UIParam(id,name,description)
{
ByteSizeInputWidget *sb = new ByteSizeInputWidget( value );
m_Widget = sb;
connect( sb, SIGNAL(byteSizeChanged(uint64_t)), this, SLOT(triggerValueChanged(uint64_t)) );
}
void UIParamByteSize::ConnectModificationSignal()
{
QObject::connect( Widget(), SIGNAL(valueChanged(uint64_t)), this, SLOT(triggerParameterUpdate()) );
}
......@@ -13,7 +13,7 @@
#include "UIParam.h"
class ByteSizeInputWidget;
#include "ByteSizeInputWidget.h"
class UIParamByteSize : public UIParam
......@@ -21,25 +21,35 @@ class UIParamByteSize : public UIParam
Q_OBJECT
public:
UIParamByteSize( const QString& id,
const QString& name,
const QString& description,
uint64_t value );
inline UIParamByteSize( const QString& id,
const QString& name,
const QString& description,
uint64_t value );
inline void SetValue( uint64_t value ) { ((QSpinBox*)m_Widget)->setValue( value ); }
inline uint64_t Value() const { return ((QSpinBox*)m_Widget)->value(); }
inline void SetValue( uint64_t value ) { Widget()->setByteSize( value ); }
inline uint64_t Value() const { return Widget()->byteSize(); }
inline const ByteSizeInputWidget* Widget() const { return (ByteSizeInputWidget*) m_Widget; }
inline ByteSizeInputWidget* Widget() { return (ByteSizeInputWidget*) m_Widget; }
void ConnectModificationSignal();
inline void ConnectModificationSignal();
};
signals:
void valueChanged( uint64_t value );
private slots:
inline void triggerValueChanged( uint64_t value ) { emit valueChanged(value); }
};
UIParamByteSize::UIParamByteSize( const QString& id,
const QString& name,
const QString& description,
uint64_t value ) :
UIParam(id,name,description)
{
m_Widget = new ByteSizeInputWidget( value );
}
void UIParamByteSize::ConnectModificationSignal()
{
QObject::connect( Widget(), SIGNAL(byteSizeChanged(uint64_t)), this, SLOT(triggerParameterUpdate()) );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment