first re-commit.
This commit is contained in:
73
libMiniCash/mcinputview.h
Normal file
73
libMiniCash/mcinputview.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/***************************************************************************
|
||||
|
||||
libMiniCash
|
||||
Copyright © 2013-2022 christoph holzheuer
|
||||
c.holzheuer@sourceworx.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef MCCINPUTVIEW_H
|
||||
#define MCCINPUTVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QRegularExpressionValidator>
|
||||
#include <QModelIndex>
|
||||
|
||||
#include <libMiniCash.h>
|
||||
|
||||
|
||||
|
||||
class MCMainWindowBase;
|
||||
class MCSalesModel;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MCInputView;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The MCInputView class
|
||||
*/
|
||||
|
||||
class LIBMINICASH_EXPORT MCInputView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MCInputView( QWidget* parent = nullptr );
|
||||
virtual ~MCInputView();
|
||||
|
||||
void setupDefaults( MCMainWindowBase* parent, MCSalesModel* salesModel );
|
||||
|
||||
public slots:
|
||||
|
||||
void onCalculatePayback();
|
||||
void onResetView();
|
||||
void onRemoveEntry( QModelIndex idx );
|
||||
void onMoveInputFocus(); /// Eingabefelder sollen auch per Enter weitergeschaltet werden
|
||||
void onAddSalesItem();
|
||||
|
||||
private:
|
||||
|
||||
Ui::MCInputView* _ui{};
|
||||
|
||||
QRegularExpressionValidator _valCustId; /// Validator für die Kundennnummer
|
||||
QRegularExpressionValidator _valItemNo; /// Validator für die laufende Nummer des Artikels
|
||||
QRegularExpressionValidator _valPrice; /// Validator für die Preisangabe
|
||||
|
||||
int _poscount = 1; /// Verkaufsposition innerhalb des aktuellen Vorgangs
|
||||
double _overallSum = 0.0; /// Gesamtpreis der aktuellen Verkaufstransaktion
|
||||
|
||||
MCSalesModel* _salesModel = nullptr;
|
||||
MCMainWindowBase* _parent = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif /// MCCINPUTVIEW_H
|
Reference in New Issue
Block a user