8#ifndef VOLTAGE_DIVIDER_H
9#define VOLTAGE_DIVIDER_H
42 void computeResults();
45 void addUpperResistor();
48 void removeUpperResistor();
51 void addLowerResistor();
54 void removeLowerResistor();
57 void on_inputChanged();
60 void showDocumentation() {
61 QString path = QString(
"/Calculators/VoltageDivider/index.html");
75 QTableWidget *tableUpper;
78 QTableWidget *tableLower;
86 QTableWidget *resultsTable;
93 double parseResistance(
const QString &valueStr)
const;
98 QString formatResistance(
double value)
const;
103 QString formatCurrent(
double value)
const;
108 QString formatPower(
double value)
const;
112 QVector<double> getUpperResistors()
const;
116 QVector<double> getLowerResistors()
const;
121 double calculateParallelResistance(
const QVector<double> &resistors)
const;
124 void updateResultsTable();
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
Dialog for designing voltage dividers with multiple parallel resistors.
Definition voltage_divider.h:33
Utility functions needed across the whole project.
void showHTMLDocs(QString path)
Show HTML documentation in the web browser.
Definition showHTMLDocs.cpp:17