first re-commit.

This commit is contained in:
2025-08-05 22:37:51 +02:00
commit 5295a82aa3
109 changed files with 9928 additions and 0 deletions

View 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();
}