2013-09-10 14:45:01 +00:00
|
|
|
#ifndef CSV_DOC_ADJUSTERWIDGET_H
|
|
|
|
#define CSV_DOC_ADJUSTERWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
2022-06-11 17:23:44 +00:00
|
|
|
#include <filesystem>
|
|
|
|
|
2013-09-10 14:45:01 +00:00
|
|
|
class QLabel;
|
|
|
|
|
|
|
|
namespace CSVDoc
|
|
|
|
{
|
2013-10-28 01:21:19 +00:00
|
|
|
enum ContentAction
|
|
|
|
{
|
|
|
|
ContentAction_New,
|
|
|
|
ContentAction_Edit,
|
|
|
|
ContentAction_Undefined
|
|
|
|
};
|
|
|
|
|
2013-09-10 14:45:01 +00:00
|
|
|
class AdjusterWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path mLocalData;
|
2013-09-10 14:45:01 +00:00
|
|
|
QLabel* mMessage;
|
|
|
|
QLabel* mIcon;
|
|
|
|
bool mValid;
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path mResultPath;
|
2013-10-28 01:21:19 +00:00
|
|
|
ContentAction mAction;
|
2013-10-31 23:12:13 +00:00
|
|
|
bool mDoFilenameCheck;
|
2013-09-10 14:45:01 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
public:
|
2020-11-13 07:39:47 +00:00
|
|
|
AdjusterWidget(QWidget* parent = nullptr);
|
2013-09-10 14:45:01 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
void setLocalData(const std::filesystem::path& localData);
|
2013-10-28 01:21:19 +00:00
|
|
|
void setAction(ContentAction action);
|
2013-09-10 14:45:01 +00:00
|
|
|
|
2013-10-31 23:12:13 +00:00
|
|
|
void setFilenameCheck(bool doCheck);
|
2013-09-23 04:52:53 +00:00
|
|
|
bool isValid() const;
|
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getPath() const;
|
2013-09-10 14:45:01 +00:00
|
|
|
///< This function must not be called if there is no valid path.
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void setName(const QString& name, bool addon);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void stateChanged(bool valid);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:52:53 +00:00
|
|
|
#endif
|