first re-commit.
This commit is contained in:
22
miniCash/main.cpp
Normal file
22
miniCash/main.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <QApplication>
|
||||
#include <QPushButton>
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#include <mcmainwindowlocal.h>
|
||||
#include <miniCash.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setOrganizationName ( miniCash::orgName );
|
||||
QCoreApplication::setOrganizationDomain( miniCash::domainName );
|
||||
QCoreApplication::setApplicationName ( miniCash::appName );
|
||||
|
||||
QApplication application(argc, argv);
|
||||
|
||||
MCMainWindowLocal window;
|
||||
window.show();
|
||||
|
||||
return application.exec();
|
||||
}
|
32
miniCash/mcaboutme.cpp
Normal file
32
miniCash/mcaboutme.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/***************************************************************************
|
||||
|
||||
miniCash
|
||||
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.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <libMiniCash.h>
|
||||
#include <miniCash.h>
|
||||
#include <mcaboutme.h>
|
||||
#include <ui_mcaboutme.h>
|
||||
|
||||
MCAboutMe::MCAboutMe(QWidget *parent) :
|
||||
QDialog( parent )
|
||||
{
|
||||
|
||||
setupUi( this );
|
||||
label2->setText( QString( miniCash::copyShort ) + '\n' + miniCash::version );
|
||||
}
|
||||
|
||||
|
||||
MCAboutMe::~MCAboutMe()
|
||||
{
|
||||
|
||||
}
|
37
miniCash/mcaboutme.h
Normal file
37
miniCash/mcaboutme.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/***************************************************************************
|
||||
|
||||
miniCash
|
||||
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 MCABOUTME_H
|
||||
#define MCABOUTME_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <ui_mcaboutme.h>
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
|
||||
class MCAboutMe : public QDialog, private Ui_MCAboutMe
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MCAboutMe( QWidget* parent = nullptr );
|
||||
virtual ~MCAboutMe();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // MCABOUTME_H
|
126
miniCash/mcaboutme.ui
Normal file
126
miniCash/mcaboutme.ui
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MCAboutMe</class>
|
||||
<widget class="QDialog" name="MCAboutMe">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>612</width>
|
||||
<height>393</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>über minCash</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>320</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>30</y>
|
||||
<width>351</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/miniCash/images/miniCash.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>200</y>
|
||||
<width>441</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Based on Qt 5.15.2(64 bit)
|
||||
|
||||
The program is provided AS IS with NO WARRANTY OF ANY KIND,
|
||||
INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>120</y>
|
||||
<width>461</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>...</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MCAboutMe</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MCAboutMe</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
107
miniCash/mceditdialog.cpp
Normal file
107
miniCash/mceditdialog.cpp
Normal file
@@ -0,0 +1,107 @@
|
||||
/***************************************************************************
|
||||
|
||||
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.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#include <QMessageBox>
|
||||
#include <mceditdialog.h>
|
||||
#include <mceditdialog.h>
|
||||
#include <ui_mceditdialog.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief Erzeugt das Dialogfenster, im dem die Kassendatei editiert
|
||||
* werden kann.
|
||||
* @param parent das Elternfenster
|
||||
* @param filename der Name der Kassendatei
|
||||
*/
|
||||
|
||||
MCEditDialog::MCEditDialog( QWidget* parent, const QString& filename ) :
|
||||
QDialog( parent ),
|
||||
_filename( filename )
|
||||
{
|
||||
|
||||
setupUi(this);
|
||||
|
||||
// Murx, FIX! das sollte über den Translator gehen
|
||||
buttonBox->button( QDialogButtonBox::Ok )->setText( "Kassendatei Speichern" );
|
||||
buttonBox->button( QDialogButtonBox::Cancel )->setText( "Abbrechen" );
|
||||
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
|
||||
connect( _startSearch, SIGNAL(clicked()), this, SLOT( onSearch() ) );
|
||||
|
||||
onLoadFile();
|
||||
|
||||
}
|
||||
|
||||
|
||||
MCEditDialog::~MCEditDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief lädt die Kassendatei
|
||||
*/
|
||||
|
||||
void MCEditDialog::onLoadFile()
|
||||
{
|
||||
QFile file( _filename );
|
||||
if( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
QString msg( "Datei '%0' konnte nicht geöffnet werden.\nFehlercode: %1" );
|
||||
QMessageBox::warning( this, "Dateifehler", msg.arg( _filename, file.errorString() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
_trSalesText->setPlainText( file.readAll() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Durchsucht die Kassendatei nach einen Schlüsselbegriff
|
||||
*/
|
||||
|
||||
void MCEditDialog::onSearch()
|
||||
{
|
||||
QString src =_searchString->text();
|
||||
_trSalesText->find( src );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief sichert die ggf. geänderte Kassendatei
|
||||
*/
|
||||
|
||||
void MCEditDialog::accept()
|
||||
{
|
||||
// sichern
|
||||
|
||||
QFile file( _filename );
|
||||
if( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
QString msg( "Datei '%0' konnte nicht geschrieben werden.\nFehlercode: %1" );
|
||||
QMessageBox::warning( this, "Dateifehler", msg.arg( _filename, file.errorString() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
file.write(_trSalesText->toPlainText().toLatin1() );
|
||||
|
||||
return QDialog::accept();
|
||||
|
||||
}
|
56
miniCash/mceditdialog.h
Normal file
56
miniCash/mceditdialog.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/***************************************************************************
|
||||
|
||||
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 MCEDITDIALOG_H
|
||||
#define MCEDITDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <miniCash.h>
|
||||
#include <ui_mceditdialog.h>
|
||||
|
||||
/**
|
||||
* @brief Editiert eine Kassendatei
|
||||
*
|
||||
* Hier kann die Verkaufsdatei einer Kassen direkt editiert
|
||||
* werden, um Zahlendrehen oder Tippfehler zu korrigieren oder
|
||||
* Einträge zu löschen (Storno des kleinen Mannes)
|
||||
*
|
||||
*/
|
||||
|
||||
class MCEditDialog : public QDialog, private Ui_MCEditDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MCEditDialog(QWidget *parent = nullptr, const QString& filename="" );
|
||||
~MCEditDialog();
|
||||
|
||||
public slots:
|
||||
|
||||
void onSearch();
|
||||
|
||||
protected:
|
||||
|
||||
void onLoadFile();
|
||||
void accept();
|
||||
|
||||
protected:
|
||||
|
||||
QString _filename;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // MCEditDialog_H
|
150
miniCash/mceditdialog.ui
Normal file
150
miniCash/mceditdialog.ui
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MCEditDialog</class>
|
||||
<widget class="QDialog" name="MCEditDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>694</width>
|
||||
<height>588</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="_label3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Suchbegriff:</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="4">
|
||||
<widget class="Line" name="_line1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="_label1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Kassendatei editieren</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="_searchString">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="_label2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Verkaufte Artikel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="4">
|
||||
<widget class="QPlainTextEdit" name="_trSalesText">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Lucida Sans Typewriter</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QPushButton" name="_startSearch">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Kassendatei durchsuchen</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suchen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/myresource/images/package_editors.png</normaloff>:/myresource/images/package_editors.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
<widget class="Line" name="_line2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
126
miniCash/mcmainwindowlocal.cpp
Normal file
126
miniCash/mcmainwindowlocal.cpp
Normal file
@@ -0,0 +1,126 @@
|
||||
/***************************************************************************
|
||||
|
||||
miniCash
|
||||
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.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QtGui>
|
||||
#include <QWidget>
|
||||
#include <QMessageBox>
|
||||
#include <QShortcut>
|
||||
#include <QInputDialog>
|
||||
#include <QDir>
|
||||
#include <QPalette>
|
||||
|
||||
#include <miniCash.h>
|
||||
#include <mcmainwindowlocal.h>
|
||||
#include <mcinputview.h>
|
||||
#include <mcsetupdialog.h>
|
||||
#include <mcbillingview.h>
|
||||
#include <mceditdialog.h>
|
||||
#include <mcaboutme.h>
|
||||
#include "ui_mcmainwindowlocal.h"
|
||||
|
||||
|
||||
MCMainWindowLocal::MCMainWindowLocal( QWidget* parent ) :
|
||||
MCMainWindowBase( parent ), _ui{new Ui::MCMainWindowLocal}
|
||||
|
||||
{
|
||||
|
||||
_ui->setupUi( this );
|
||||
setupDefaults();
|
||||
|
||||
_inputViewProxy = _ui->_inputView;
|
||||
_ui->_inputView->setupDefaults( this, &_salesModel );
|
||||
_ui->_billingView->setupDefaults( _dataFileName, &_mainSettings );
|
||||
_ui->_contentWidget->setCurrentWidget( _ui->_inputView );
|
||||
|
||||
statusBar()->setFont( QFont( "Arial", 8 ) );
|
||||
statusBar()->showMessage( QString( miniCash::copyright ) + miniCash::version );
|
||||
|
||||
//_helpViewer = new MCHelpViewer();
|
||||
//_helpViewer->load( "file:///C:/HandbuchMiniCash.html" );
|
||||
|
||||
// Menü Leiste
|
||||
connect( _ui->_actionHelpAbout, SIGNAL(triggered()), this, SLOT( onHelpAbout() ) );
|
||||
connect( _ui->_actionHelpContents, SIGNAL(triggered()), this, SLOT( onHelpManual() ) );
|
||||
connect( _ui->_actionStartBilling, SIGNAL(triggered()), this, SLOT( onStartBilling() ) );
|
||||
connect( _ui->_actionEditSalesFile, SIGNAL(triggered()), this, SLOT( onEditTransactions() ) );
|
||||
connect( _ui->_actionCopySaleData, SIGNAL(triggered()), this, SLOT( onCopyTransactions() ) );
|
||||
connect( _ui->_actionSetup, SIGNAL(triggered()), this, SLOT( onSetup() ) );
|
||||
connect( _ui->_actionExit, SIGNAL(triggered()), this, SLOT( onExit()) );
|
||||
connect( _ui->_actionExitConfirmed, SIGNAL(triggered()), this, SLOT( onExitConfirmed()) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Tod und Verderben
|
||||
*/
|
||||
|
||||
MCMainWindowLocal::~MCMainWindowLocal()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief In den Abrechungsmodus schalten
|
||||
*
|
||||
* Abrechnung starten: Dazu wird das Hauptfenster auf die Abrechungsmaske
|
||||
* umgeschaltet (irreversibel)
|
||||
*/
|
||||
|
||||
void MCMainWindowLocal::onStartBilling()
|
||||
{
|
||||
_ui->_contentWidget->setCurrentWidget( _ui->_billingView );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Die Kassendatei editieren
|
||||
*/
|
||||
|
||||
void MCMainWindowLocal::onEditTransactions()
|
||||
{
|
||||
MCEditDialog dlg( this, _dataFilePath );
|
||||
dlg.exec();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief setup dialog anzeigen
|
||||
*
|
||||
* Maske mit den Programmeinstellungen anzeigen: Ziellaufwerk etc.
|
||||
*
|
||||
*/
|
||||
|
||||
void MCMainWindowLocal::onSetup()
|
||||
{
|
||||
MCSetupDialog dlg( this, &_mainSettings );
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Kurzinfo anzeigen
|
||||
*
|
||||
*/
|
||||
|
||||
void MCMainWindowLocal::onHelpAbout()
|
||||
{
|
||||
MCAboutMe aboutMe;
|
||||
aboutMe.exec();
|
||||
|
||||
}
|
42
miniCash/mcmainwindowlocal.h
Normal file
42
miniCash/mcmainwindowlocal.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef MCMAINWINDOWLOCAL_H
|
||||
#define MCMAINWINDOWLOCAL_H
|
||||
|
||||
#include <mcmainwindowbase.h>
|
||||
#include <ui_mcmainwindowlocal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
class MCMainWindowLocal;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/**
|
||||
* @brief MainWindow der miniCash-Anwendung.
|
||||
*
|
||||
* Erbt von MCMainWindowBase und stellt die Implementierung der Nutzeroberfläche
|
||||
* zur Verfügung.
|
||||
*/
|
||||
|
||||
class MCMainWindowLocal : public MCMainWindowBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MCMainWindowLocal( QWidget* parent = 0 );
|
||||
virtual ~MCMainWindowLocal();
|
||||
|
||||
protected slots:
|
||||
|
||||
void onSetup() override; // Programmeinstellungen vornehmen
|
||||
void onEditTransactions() override; // Kassendatei durchsuchen und editieren
|
||||
void onStartBilling() override; // Kassieren beenden, Abrechnungsmodus starten
|
||||
void onHelpAbout() override; // Kurzinfo anzeigen
|
||||
|
||||
private:
|
||||
|
||||
Ui::MCMainWindowLocal* _ui{};
|
||||
};
|
||||
|
||||
#endif // MCMAINWINDOWLOCAL
|
266
miniCash/mcmainwindowlocal.ui
Normal file
266
miniCash/mcmainwindowlocal.ui
Normal file
@@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MCMainWindowLocal</class>
|
||||
<widget class="QMainWindow" name="MCMainWindowLocal">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>miniCash.local</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="_centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="_contentWidget">
|
||||
<widget class="MCBillingView" name="_billingView"/>
|
||||
<widget class="MCInputView" name="_inputView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="_menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<widget class="QMenu" name="_menuFile">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Datei</string>
|
||||
</property>
|
||||
<addaction name="_actionEditSalesFile"/>
|
||||
<addaction name="_actionSetup"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="_actionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="_menuCalc">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Abrechnung</string>
|
||||
</property>
|
||||
<addaction name="_actionCopySaleData"/>
|
||||
<addaction name="_actionStartBilling"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="_menuHelp">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Hilfe</string>
|
||||
</property>
|
||||
<addaction name="_actionHelpContents"/>
|
||||
<addaction name="_actionHelpAbout"/>
|
||||
</widget>
|
||||
<addaction name="_menuFile"/>
|
||||
<addaction name="_menuCalc"/>
|
||||
<addaction name="_menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="_mainToolBar">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="_actionEditSalesFile"/>
|
||||
<addaction name="_actionCopySaleData"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="_actionExitConfirmed"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="_statusBar">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
<action name="_actionExit">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/exit.png</normaloff>:/images/exit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Speichern und Beenden</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Speichern und Programm beenden</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionHelpContents">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/contexthelp.png</normaloff>:/images/contexthelp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Handbuch anzeigen</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionHelpAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/help.png</normaloff>:/images/help.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Über miniCash</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionStartBilling">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/buisness.png</normaloff>:/images/buisness.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Abrechung starten</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Abrechnung starten</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Eingabe verlassen und Abrechnung starten</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionEditSalesFile">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/agt_Utilities.png</normaloff>:/images/agt_Utilities.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Kassendatei editieren</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Verkauften Artikel suchen und ggf. stornieren</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionCopySaleData">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/stick.png</normaloff>:/images/stick.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Daten &kopieren</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Kopiert die Verkaufsdaten auf den Memorystick</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Kopiert die Verkaufsdaten auf den Memorystick</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionExitConfirmed">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/exit.png</normaloff>:/images/exit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ExitConfirmed</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Speichern und Programm beenden</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="_actionSetup">
|
||||
<property name="icon">
|
||||
<iconset resource="miniCash.qrc">
|
||||
<normaloff>:/images/agt_utilities_copy.png</normaloff>:/images/agt_utilities_copy.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Programmeinstellungen</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MCInputView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>mcinputview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MCBillingView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>mcbillingview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="miniCash.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
112
miniCash/miniCash.h
Normal file
112
miniCash/miniCash.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/***************************************************************************
|
||||
|
||||
miniCash
|
||||
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 MINICASH_H
|
||||
#define MINICASH_H
|
||||
|
||||
#include <libMiniCash.h>
|
||||
|
||||
/**
|
||||
|
||||
@mainpage miniCash
|
||||
|
||||
@section xxx das Kassensystem 'miniCash'
|
||||
|
||||
'miniCash' ist ein semi-verteiltes Kassen- und Abrechnungssystem für den KinderKleiderMarkt
|
||||
in Kist. Beim Kister Kleidermarkt können Kindersachen günstig verkauft und erworben, sozusagen
|
||||
weitergereicht werden.
|
||||
so
|
||||
|
||||
...
|
||||
|
||||
@warning ein zwei warning
|
||||
|
||||
@note ein zwei note
|
||||
|
||||
@bug ein zwei bug
|
||||
|
||||
@deprecated ein zwei deprecated
|
||||
|
||||
@todo eins zwei todo
|
||||
|
||||
@remark eins zwei remark
|
||||
|
||||
@subsection xxz Funktionsbereiche
|
||||
- Datenmodelle und Datentypen
|
||||
- Eingabe der Verkäufe
|
||||
- Setup-Dialoge
|
||||
- Erzeugung der Abrechnungen
|
||||
- Druckersteuerung
|
||||
|
||||
@section sec3 Ideen & TODO:
|
||||
|
||||
@warning das handling von 'enter' und 'tab' überprüfen
|
||||
@bug die filterung von falschen kundennummern geht nicht.
|
||||
|
||||
@subsection sec3_1 Ideen:
|
||||
|
||||
- oberfläche erneuern?
|
||||
- beim server hochfahren: daten abholen, puffern, wahlweise via usb
|
||||
- adressverwaltung einbeziehen, für personalisierte Abrechnungen
|
||||
|
||||
@subsection sec3_2 TODO für 1.0:
|
||||
|
||||
- wlan first, disk backup
|
||||
- netzprotocol, erfinden oder json/xml
|
||||
- splash screen?
|
||||
- fehler dulden wg. Kassenschlange, hinterher kennzeichnen
|
||||
- server security: only allowed hosts
|
||||
- auto feeder zum testen
|
||||
- data: kasse|count|cust|pos|price|timestamp
|
||||
- protocol: [...]: transaction, -: storno;
|
||||
- kasse: semi blocking (soll genau was heissen, chris?)
|
||||
- Beim einlesen mitzählen, Ergebnis in den statusbar.
|
||||
- suche bei Storno mit mehreren Feldern zulassen
|
||||
- setup.exe bauen
|
||||
|
||||
|
||||
@subsection sec3_3 TODO für 0.9:
|
||||
|
||||
- backup über WLAN -> Adhoc Netzwerk einrichten
|
||||
- DONE: layouts verwenden
|
||||
- Handbuch schreiben
|
||||
- DONE: vernünftiger Setup-dialog mit Abbruchmöglichkeit
|
||||
- Auswertung: laden und speichern ?
|
||||
- Printbuttons ab/an schalten ?
|
||||
- Kurzanleitung ?
|
||||
- QUARK: programm muss immer starten, fehlerloop verwirrt nur
|
||||
QUARK: Programm _kann_ ohne Laufwerk nicht starten!
|
||||
- help about : mit hinweis auf sourceworx & logo
|
||||
- Fonts vereinheitlichen
|
||||
- Statusbar einbinden ?!?
|
||||
- Caps lock abschalten, wie ?
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief der namespace miniCash enthält Definitionen und Konstanten.
|
||||
*/
|
||||
|
||||
namespace miniCash
|
||||
{
|
||||
/// basics
|
||||
[[maybe_unused]] static const char* const appName = "miniCash.local";
|
||||
|
||||
/// misc
|
||||
[[maybe_unused]] static const char* const version = "Version 0.8.21. 14.07.2022";
|
||||
|
||||
}
|
||||
|
||||
#endif // MINICASH_H
|
49
miniCash/miniCash.pro
Normal file
49
miniCash/miniCash.pro
Normal file
@@ -0,0 +1,49 @@
|
||||
QT += core gui widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = miniCash
|
||||
|
||||
|
||||
DESTDIR = $$OUT_PWD/../common
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/../libMiniCash
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mcaboutme.cpp \
|
||||
mceditdialog.cpp \
|
||||
mcmainwindowlocal.cpp
|
||||
|
||||
HEADERS += \
|
||||
mcaboutme.h \
|
||||
mceditdialog.h \
|
||||
mcmainwindowlocal.h \
|
||||
miniCash.h
|
||||
|
||||
FORMS += \
|
||||
mcaboutme.ui \
|
||||
mceditdialog.ui \
|
||||
mcmainwindowlocal.ui
|
||||
|
||||
DEPENDPATH += $$PWD/../libMiniCash
|
||||
|
||||
LIBS += -L$$OUT_PWD/../common -llibMiniCash
|
||||
|
||||
|
||||
#PRE_TARGETDEPS += $$OUT_PWD/../build/lib/$$qtLibraryTarget(libMiniCash)
|
||||
|
||||
#SRC_DIR = $$OUT_PWD/../libMiniCash/debug
|
||||
#DEST_DIR = $$OUT_PWD/debug
|
||||
|
||||
#QMAKE_PRE_LINK += $$QMAKE_COPY_FILE $$shell_path($$SRC_DIR/libMiniCash.dll) $$shell_path($$DEST_DIR)
|
||||
#QMAKE_POST_LINK += $$QMAKE_COPY_FILE $$shell_path($$SRC_DIR/libMiniCash.dll) $$shell_path($$DEST_DIR)
|
||||
|
||||
|
||||
message("OUT_PWD = $$OUT_PWD")
|
||||
message("shellpath = $$shell_path($$SRC_DIR/libMiniCash.dll)")
|
||||
message("dest = $$shell_path($$DEST_DIR)")
|
||||
message("copy file = $$QMAKE_COPY_FILE")
|
||||
|
32
miniCash/miniCash.qrc
Normal file
32
miniCash/miniCash.qrc
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE RCC>
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>images/agt_utilities_copy.png</file>
|
||||
<file>images/agt_Utilities.png</file>
|
||||
<file>images/buisness.png</file>
|
||||
<file>images/help.png</file>
|
||||
<file>images/contexthelp.png</file>
|
||||
<file>images/copy.png</file>
|
||||
<file>images/cut.png</file>
|
||||
<file>images/exit.png</file>
|
||||
<file>images/filenew.png</file>
|
||||
<file>images/fileopen.png</file>
|
||||
<file>images/filesave.png</file>
|
||||
<file>images/filesaveas.png</file>
|
||||
<file>images/findf.png</file>
|
||||
<file>images/folder_new.png</file>
|
||||
<file>images/new.png</file>
|
||||
<file>images/open.png</file>
|
||||
<file>images/paste.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/stick.png</file>
|
||||
<file>images/printer2.png</file>
|
||||
<file>images/fileexport.png</file>
|
||||
<file>images/button_ok.png</file>
|
||||
<file>images/search.png</file>
|
||||
<file>templates/tplFinal.html</file>
|
||||
<file>templates/tplPayoff.html</file>
|
||||
<file>templates/tplReceipt.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Reference in New Issue
Block a user