added config save
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QJsonObject>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
@@ -40,6 +41,8 @@ private slots:
|
||||
void on_searchButton_clicked();
|
||||
void on_searchNextButton_clicked();
|
||||
|
||||
void on_deeplApiKey_editingFinished();
|
||||
|
||||
private:
|
||||
struct TranslationItem {
|
||||
TranslationItem(int line_, QString character_, QString oldText_, QString newText_):
|
||||
@@ -53,9 +56,10 @@ private:
|
||||
QString newText;
|
||||
};
|
||||
Ui::MainWindow *ui;
|
||||
QJsonObject configuration;
|
||||
bool noConfigChange{false};
|
||||
std::map<QString, QString> fileContentsMap;
|
||||
std::map<QString, std::vector<QString> > translationsMap;
|
||||
const QString deeplAuthKey = "5f6bc5cc-1e5d-4c69-9ef0-eb3cc2c1ece5:fx";
|
||||
QString searchQuery;
|
||||
void crawlProject();
|
||||
void populateTreeWidgetFromMap();
|
||||
@@ -72,5 +76,6 @@ private:
|
||||
void searchNext();
|
||||
void searchInTree(QTreeWidgetItem *item, const QString &query);
|
||||
QVector<TranslationItem> parseTextBlock(const QString &block);
|
||||
void setConfigValue(const QString &key, const QString &value);
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user