|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2014-2016 Markus Prasser
|
|
|
|
|
* Copyright 2014-2018 Markus Prasser, Tobias Weiss
|
|
|
|
|
*
|
|
|
|
|
* This file is part of Labcontrol.
|
|
|
|
|
*
|
|
|
|
@ -17,14 +17,14 @@
|
|
|
|
|
* along with Labcontrol. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
|
|
|
|
|
#include "manualprintingsetup.h"
|
|
|
|
|
#include "ui_manualprintingsetup.h"
|
|
|
|
|
#include "Lib/settings.h"
|
|
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
extern std::unique_ptr<lc::Settings> settings;
|
|
|
|
|
|
|
|
|
|
lc::ManualPrintingSetup::ManualPrintingSetup(QWidget *argParent) :
|
|
|
|
@ -52,11 +52,13 @@ lc::ManualPrintingSetup::ManualPrintingSetup( QWidget *argParent ) :
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lc::ManualPrintingSetup::~ManualPrintingSetup() {
|
|
|
|
|
lc::ManualPrintingSetup::~ManualPrintingSetup()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lc::ManualPrintingSetup::on_PBSelectFile_clicked() {
|
|
|
|
|
void lc::ManualPrintingSetup::on_PBSelectFile_clicked()
|
|
|
|
|
{
|
|
|
|
|
QFileDialog fileDialog{this, tr("Please choose a payment file to print."),
|
|
|
|
|
QDir::homePath(), "*.pay"};
|
|
|
|
|
fileDialog.setFileMode(QFileDialog::ExistingFile);
|
|
|
|
@ -73,19 +75,22 @@ void lc::ManualPrintingSetup::on_PBSelectFile_clicked() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lc::ManualPrintingSetup::on_CBReceiptsHeader_activated( int argIndex ) {
|
|
|
|
|
void lc::ManualPrintingSetup::on_CBReceiptsHeader_activated(const int argIndex)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(argIndex);
|
|
|
|
|
ui->CBReceiptsHeader->setStyleSheet("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lc::ManualPrintingSetup::on_ChBPrintAnonymousReceipts_clicked( bool argChecked ) {
|
|
|
|
|
void lc::ManualPrintingSetup::on_ChBPrintAnonymousReceipts_clicked(const bool argChecked)
|
|
|
|
|
{
|
|
|
|
|
ui->ChBPrintAnonymousReceipts->setStyleSheet("");
|
|
|
|
|
|
|
|
|
|
ui->LReplaceParticipantNames->setEnabled(argChecked);
|
|
|
|
|
ui->CBReplaceParticipantNames->setEnabled(argChecked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lc::ManualPrintingSetup::on_PBPrint_clicked() {
|
|
|
|
|
void lc::ManualPrintingSetup::on_PBPrint_clicked()
|
|
|
|
|
{
|
|
|
|
|
QString anonymousReceiptsPlaceholder;
|
|
|
|
|
if (ui->ChBPrintAnonymousReceipts->isChecked()) {
|
|
|
|
|
anonymousReceiptsPlaceholder = ui->CBReplaceParticipantNames->currentText();
|
|
|
|
|