/*************************************************************************** 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #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(); }