mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-03 23:05:11 -04:00
22.21.4.2 4/19/2021
--User changes -Allow users to set the Exp value when using the Exp temporal filter type. -Set the default temporal filter type to be Box, which does not alter the palette values at all during animation. This is done to avoid confusion when using Gaussian or Exp which can produce darkened images. --Bug fixes -Sending a sequence to the final render dialog when the keyframes had non zero rotate and center Y values would produce off center animations when rendered. -Temporal filters were being unnecessarily recreated many times when rendering or generating sequences. -Exp filter was always treated like a Box filter. --Code changes -Add a new member function SaveCurrentAsXml(QString filename = "") to the controllers which is only used for testing. -Modernize some C++ code.
This commit is contained in:
@ -22,10 +22,10 @@ public:
|
||||
/// <param name="parent">The parent widget. Default: nullptr.</param>
|
||||
explicit DoubleSpinBoxTableItemDelegate(DoubleSpinBox* spinBox, QObject* parent = nullptr)
|
||||
: QItemDelegate(parent),
|
||||
m_SpinBox(spinBox)
|
||||
m_SpinBox(spinBox)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Re-parent and return the DoubleSpinBox to display when the user clicks on a cell and it enters edit mode.
|
||||
/// The re-parenting is done so that the DoubleSpinBox appears directly on top of the cell.
|
||||
@ -34,10 +34,9 @@ public:
|
||||
/// <param name="option">Ignored</param>
|
||||
/// <param name="index">Ignored</param>
|
||||
/// <returns>The DoubleSpinBox member</returns>
|
||||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
{
|
||||
m_SpinBox->setParent(parent);
|
||||
|
||||
return m_SpinBox;
|
||||
}
|
||||
|
||||
@ -46,7 +45,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="editor">Ignored</param>
|
||||
/// <param name="index">Ignored</param>
|
||||
virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override
|
||||
void destroyEditor(QWidget* editor, const QModelIndex& index) const override
|
||||
{
|
||||
}
|
||||
|
||||
@ -55,11 +54,10 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="editor">Ignored</param>
|
||||
/// <param name="index">Ignored</param>
|
||||
virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const override
|
||||
{
|
||||
QPoint p(index.row(), index.column());
|
||||
auto value = index.model()->data(index, Qt::EditRole).toDouble();
|
||||
|
||||
const QPoint p(index.row(), index.column());
|
||||
const auto value = index.model()->data(index, Qt::EditRole).toDouble();
|
||||
m_SpinBox->setProperty("tableindex", p);
|
||||
m_SpinBox->setValue(value);
|
||||
}
|
||||
@ -70,7 +68,7 @@ public:
|
||||
/// <param name="editor">Ignored</param>
|
||||
/// <param name="model">The model whose value will be set</param>
|
||||
/// <param name="index">The cell index of the model</param>
|
||||
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override
|
||||
void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override
|
||||
{
|
||||
model->setData(index, m_SpinBox->value(), Qt::EditRole);
|
||||
}
|
||||
@ -81,7 +79,7 @@ public:
|
||||
/// <param name="editor">The DoubleSpinBox member</param>
|
||||
/// <param name="option">Contains the rectangle to be used for the geometry of the DoubleSpinBox</param>
|
||||
/// <param name="index">Ignored</param>
|
||||
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
{
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
Reference in New Issue
Block a user