Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,59 @@
|
||||
// **************************************************************************
|
||||
//
|
||||
// (C) Copyright 2009 Swiss SIMTEC AG
|
||||
//
|
||||
// **************************************************************************
|
||||
//
|
||||
// $HeadURL$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $LastChangedRevision$
|
||||
//
|
||||
// **************************************************************************
|
||||
|
||||
#include "LogViewSpinBox.hpp"
|
||||
#include "LogViewField.hpp"
|
||||
|
||||
namespace N_LogView
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
LogViewSpinBox::LogViewSpinBox(LogViewField* a_field, QWidget* a_parent, const int a_value)
|
||||
: QSpinBox(a_parent)
|
||||
, LogViewWidget(a_field, this, a_parent, false)
|
||||
{
|
||||
// set range
|
||||
uint16_t maxArraySize = a_field->maxArraySize();
|
||||
setRange(0, maxArraySize);
|
||||
|
||||
// set the actual value
|
||||
setValue(a_value);
|
||||
|
||||
// set tooltip-text
|
||||
setToolTip(tr("<nobr>Wertebereich: 0..%1</nobr>").arg(maxArraySize));
|
||||
|
||||
// connect
|
||||
connect(this, &LogViewSpinBox::editingFinished,
|
||||
this, &LogViewSpinBox::finishEditing);
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
void LogViewSpinBox::finishEditing()
|
||||
{
|
||||
emit valueEditingFinished(text().toInt());
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Writes the content into telegram.
|
||||
// Returns true if successful.
|
||||
// ---------------------------------------------------------------
|
||||
bool LogViewSpinBox::saveContent(LogViewTelegram* a_telegram)
|
||||
{
|
||||
Q_UNUSED(a_telegram);
|
||||
// not yet implemented
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace N_LogView
|
||||
Reference in new issue
Block a user