12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef TOTALSWIDGET_H
- #define TOTALSWIDGET_H
- #include "QtWidgets/qlineedit.h"
- #include "src/gui/verification/timeinput.h"
- #include "src/opl.h"
- #include <QWidget>
- #include <QRegularExpressionValidator>
- namespace Ui {
- class TotalsWidget;
- }
- class TotalsWidget : public QWidget
- {
- Q_OBJECT
- public:
- enum WidgetType {TotalTimeWidget, PreviousExperienceWidget};
- explicit TotalsWidget(WidgetType widgetType, QWidget *parent = nullptr);
- ~TotalsWidget();
- private:
- Ui::TotalsWidget *ui;
-
- OPL::RowData_T m_rowData;
-
- const static int ROW_ID = 1;
- void fillTotals(const WidgetType widgetType);
- void setup(const WidgetType widgetType);
- void connectSignalsAndSlots();
- bool verifyUserTimeInput(QLineEdit *line_edit, const TimeInput &input);
- bool updateTimeEntry(const QLineEdit* line_edit);
- bool updateMovementEntry(const QLineEdit* line_edit);
- private slots:
- void timeLineEditEditingFinished();
- void movementLineEditEditingFinished();
- };
- #endif
|