fractorium/Source/Fractorium/VariationsDialog.h
Person 8086cfa731 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.
2021-04-19 21:07:24 -06:00

52 lines
1.6 KiB
C++

#pragma once
#include "ui_VariationsDialog.h"
#include "FractoriumSettings.h"
/// <summary>
/// FractoriumVariationsDialog class.
/// </summary>
/// <summary>
/// The variations filter dialog displays several columns
/// with the different types of variations shown as checkboxes.
/// This is used to filter the variations that are shown in the main window
/// because the list is very long.
/// The results are stored in a map and returned.
/// These are used in conjunction with the filter edit box to filter what's shown.
/// </summary>
class FractoriumVariationsDialog : public QDialog
{
Q_OBJECT
public:
FractoriumVariationsDialog(QWidget* p = nullptr, Qt::WindowFlags f = nullptr);
void ForEachCell(std::function<void(QTableWidgetItem* cb)> func);
void ForEachSelectedCell(std::function<void(QTableWidgetItem* cb)> func);
void SyncSettings();
const QMap<QString, QVariant>& Map();
public slots:
void OnSelectAllButtonClicked(bool checked);
void OnInvertSelectionButtonClicked(bool checked);
void OnSelectNoneButtonClicked(bool checked);
void OnSelectionCheckBoxStateChanged(int i);
void OnVariationsTableItemChanged(QTableWidgetItem* item);
void accept() override;
void reject() override;
protected:
void showEvent(QShowEvent* e) override;
private:
void ClearTypesStealth();
void DataToGui();
void GuiToData();
void Populate();
void SetCheckFromMap(QTableWidgetItem* cb, const Variation<float>* var);
shared_ptr<VariationList<float>> m_VariationList;
vector<QCheckBox*> m_CheckBoxes;
QMap<QString, QVariant> m_Vars;
shared_ptr<FractoriumSettings> m_Settings;
Ui::VariationsDialog ui;
};