mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-29 13:39:55 +00:00
system source, some code improvements
This commit is contained in:
@ -33,25 +33,25 @@ class AWJsonFormatter : public AWAbstractFormatter
|
||||
|
||||
public:
|
||||
explicit AWJsonFormatter(QWidget *_parent = nullptr, const QString &_filePath = "");
|
||||
virtual ~AWJsonFormatter();
|
||||
QString convert(const QVariant &_value) const;
|
||||
AWJsonFormatter *copy(const QString &_fileName, const int _number);
|
||||
~AWJsonFormatter() override;
|
||||
QString convert(const QVariant &_value) const override;
|
||||
AWJsonFormatter *copy(const QString &_fileName, const int _number) override;
|
||||
// properties
|
||||
QString path() const;
|
||||
void setPath(const QString &_path);
|
||||
|
||||
public slots:
|
||||
void readConfiguration();
|
||||
int showConfiguration(const QVariant &_args);
|
||||
void writeConfiguration() const;
|
||||
void readConfiguration() override;
|
||||
int showConfiguration(const QVariant &_args) override;
|
||||
void writeConfiguration() const override;
|
||||
|
||||
private:
|
||||
Ui::AWJsonFormatter *ui = nullptr;
|
||||
QVariant getFromJson(const QVariant &_value, const QVariant &_element) const;
|
||||
QVariant getFromList(const QVariant &_value, const int _index) const;
|
||||
QVariant getFromMap(const QVariant &_value, const QString &_key) const;
|
||||
static QVariant getFromList(const QVariant &_value, const int _index);
|
||||
static QVariant getFromMap(const QVariant &_value, const QString &_key);
|
||||
void initPath();
|
||||
void translate();
|
||||
void translate() override;
|
||||
// properties
|
||||
QString m_path;
|
||||
QVariantList m_splittedPath;
|
||||
|
Reference in New Issue
Block a user