This commit is contained in:
2025-05-08 21:02:56 +03:00
parent 6706cbec45
commit 86a11faf70
24 changed files with 1022 additions and 460 deletions

View File

@@ -50,10 +50,5 @@ bool OutputOptions::get_print_header() { return this->print_header; }
void OutputOptions::set_print_total(bool value) { this->print_total = value; }
bool OutputOptions::get_print_total() { return this->print_total; }
OutputFormat OutputOptions::get_output_format() { return this->format; }
void OutputOptions::set_output_format(OutputFormat format) {
this->format = format;
}
void OutputOptions::set_path(std::string path) { this->path = path; }
std::string &OutputOptions::get_path() { return this->path; }

View File

@@ -3,7 +3,7 @@
#include <string>
#include <vector>
#if __GNUC__ < 8
#if __GNUC__ <= 8 && __clang_major__ < 17
# include <experimental/filesystem>
#else
# include <filesystem>
@@ -15,6 +15,7 @@
#include "../settings/settings.h"
enum class ColumnType {
date,
goods_name,
goods_price_per_unit,
goods_quantity,
@@ -28,14 +29,12 @@ struct Column { // Example:
unsigned int position; // "0" <-- 0 = "A", 1 = "B", etc.. column letter in
// table processor (i.e. excel or libreoffice)
} typedef Column;
enum class OutputFormat { csv, ods, xlsx, plaintext } typedef OutputFormat;
class OutputOptions {
std::vector<Column> order;
bool print_header;
bool print_total;
OutputFormat format;
std::string path;
public:
@@ -56,9 +55,6 @@ public:
void set_print_total(bool);
bool get_print_total();
void set_output_format(OutputFormat);
OutputFormat get_output_format();
void set_path(std::string);
std::string &get_path();
};