2021-09-07 21:10:18 +00:00
|
|
|
#ifndef CSV_TOOLS_MERGE_H
|
|
|
|
#define CSV_TOOLS_MERGE_H
|
2015-08-06 10:52:10 +00:00
|
|
|
|
2015-08-13 10:53:00 +00:00
|
|
|
#include <QWidget>
|
2015-08-06 10:52:10 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
#include <filesystem>
|
2015-08-06 10:52:10 +00:00
|
|
|
|
|
|
|
class QPushButton;
|
|
|
|
class QListWidget;
|
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
2015-08-16 13:24:48 +00:00
|
|
|
class DocumentManager;
|
2015-08-06 10:52:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVDoc
|
|
|
|
{
|
|
|
|
class FileWidget;
|
|
|
|
class AdjusterWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVTools
|
|
|
|
{
|
2015-08-13 10:53:00 +00:00
|
|
|
class Merge : public QWidget
|
2015-08-06 10:52:10 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
CSMDoc::Document* mDocument;
|
|
|
|
QPushButton* mOkay;
|
|
|
|
QListWidget* mFiles;
|
|
|
|
CSVDoc::FileWidget* mNewFile;
|
|
|
|
CSVDoc::AdjusterWidget* mAdjuster;
|
2015-08-16 13:24:48 +00:00
|
|
|
CSMDoc::DocumentManager& mDocumentManager;
|
2015-08-06 10:52:10 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void keyPressEvent(QKeyEvent* event) override;
|
2015-08-13 10:53:00 +00:00
|
|
|
|
2015-08-06 10:52:10 +00:00
|
|
|
public:
|
2020-11-13 07:39:47 +00:00
|
|
|
Merge(CSMDoc::DocumentManager& documentManager, QWidget* parent = nullptr);
|
2015-08-06 10:52:10 +00:00
|
|
|
|
2020-11-13 07:39:47 +00:00
|
|
|
/// Configure dialogue for a new merge
|
|
|
|
void configure(CSMDoc::Document* document);
|
2015-08-06 10:52:10 +00:00
|
|
|
|
|
|
|
void setLocalData(const std::filesystem::path& localData);
|
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
CSMDoc::Document* getDocument() const;
|
2015-08-06 10:52:10 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
2015-08-13 10:53:00 +00:00
|
|
|
void cancel();
|
2015-08-06 10:52:10 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
2015-08-13 10:53:00 +00:00
|
|
|
void accept();
|
2015-08-06 10:52:10 +00:00
|
|
|
|
2015-08-13 10:53:00 +00:00
|
|
|
void stateChanged(bool valid);
|
2015-08-06 10:52:10 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|