NDEVR
API Documentation
FormulaDialog.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Formula.h>
4#include <QWidget>
5class QGridLayout;
6class QLabel;
7namespace NDEVR
8{
9 class QCustomLabel;
10 class QCustomLineEdit;
11 class Button;
15 class NDEVR_API FormulaDialog : public QWidget
16 {
17 public:
22 FormulaDialog(const File& formula_file);
27 void setupForFormula(Formula& formula);
36 void pushFormula(Formula& formula);
40 void popFormula();
41 protected:
46 QSize sizeHint() const override;
55 private:
56 String m_current_category;
57 Button* m_finished_button;
58 Formula* m_current_formula;
59 FormulaTree m_formula_tree;
60 Buffer<QCustomLineEdit*> m_line_edits;
61 Buffer<Button*> m_buttons;
62 Buffer<Formula> m_formula_stack;
63 QLabel* m_formula_label;
64 QLabel* m_filled_formula_label;
65 QGridLayout* m_variable_layout;
66 };
67}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A core widget that allows the user to click one of many button types.
Definition Button.h:68
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
void setupForRoot()
Configures the dialog to display the root formula selection.
void updateFormula()
Updates the formula display and variable inputs to reflect the current state.
void popFormula()
Pops the current formula from the stack and returns to the previous one.
void clearLayout()
Clears the variable layout of all dynamically created widgets.
QSize sizeHint() const override
Returns the preferred size hint for layout calculations.
void setupForFormula(Formula &formula)
Configures the dialog to display and edit the given formula.
void pushFormula(Formula &formula)
Pushes a sub-formula onto the navigation stack and displays it.
FormulaDialog(const File &formula_file)
Constructs a FormulaDialog from a formula definition file.
Displays translated text.
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
The core String class for the NDEVR API.
Definition String.h:95
The primary namespace for the NDEVR SDK.
Logic that saves formulas into a tree-like dependency structure.
Definition Formula.h:67
Logic for storing the definition of a formula, that can be displayed to the end-user.
Definition Formula.h:12