AUTO_PROPERTY finished

This commit is contained in:
Pokamest Nikak 2021-09-08 13:52:36 +03:00
parent 63ffa4a212
commit 16e887dcf0
34 changed files with 510 additions and 3156 deletions

View file

@ -9,19 +9,19 @@ class ShadowSocksLogic : public PageLogicBase
{
Q_OBJECT
public:
Q_PROPERTY(bool widgetProtoSsEnabled READ getWidgetProtoSsEnabled WRITE setWidgetProtoSsEnabled NOTIFY widgetProtoSsEnabledChanged)
Q_PROPERTY(QString comboBoxProtoShadowsocksCipherText READ getComboBoxProtoShadowsocksCipherText WRITE setComboBoxProtoShadowsocksCipherText NOTIFY comboBoxProtoShadowsocksCipherTextChanged)
Q_PROPERTY(QString lineEditProtoShadowsocksPortText READ getLineEditProtoShadowsocksPortText WRITE setLineEditProtoShadowsocksPortText NOTIFY lineEditProtoShadowsocksPortTextChanged)
Q_PROPERTY(bool pushButtonProtoShadowsocksSaveVisible READ getPushButtonProtoShadowsocksSaveVisible WRITE setPushButtonProtoShadowsocksSaveVisible NOTIFY pushButtonProtoShadowsocksSaveVisibleChanged)
Q_PROPERTY(bool progressBarProtoShadowsocksResetVisible READ getProgressBarProtoShadowsocksResetVisible WRITE setProgressBarProtoShadowsocksResetVisible NOTIFY progressBarProtoShadowsocksResetVisibleChanged)
Q_PROPERTY(bool lineEditProtoShadowsocksPortEnabled READ getLineEditProtoShadowsocksPortEnabled WRITE setLineEditProtoShadowsocksPortEnabled NOTIFY lineEditProtoShadowsocksPortEnabledChanged)
Q_PROPERTY(bool pageProtoShadowsocksEnabled READ getPageProtoShadowsocksEnabled WRITE setPageProtoShadowsocksEnabled NOTIFY pageProtoShadowsocksEnabledChanged)
Q_PROPERTY(bool labelProtoShadowsocksInfoVisible READ getLabelProtoShadowsocksInfoVisible WRITE setLabelProtoShadowsocksInfoVisible NOTIFY labelProtoShadowsocksInfoVisibleChanged)
Q_PROPERTY(QString labelProtoShadowsocksInfoText READ getLabelProtoShadowsocksInfoText WRITE setLabelProtoShadowsocksInfoText NOTIFY labelProtoShadowsocksInfoTextChanged)
Q_PROPERTY(int progressBarProtoShadowsocksResetValue READ getProgressBarProtoShadowsocksResetValue WRITE setProgressBarProtoShadowsocksResetValue NOTIFY progressBarProtoShadowsocksResetValueChanged)
Q_PROPERTY(int progressBarProtoShadowsocksResetMaximium READ getProgressBarProtoShadowsocksResetMaximium WRITE setProgressBarProtoShadowsocksResetMaximium NOTIFY progressBarProtoShadowsocksResetMaximiumChanged)
AUTO_PROPERTY(bool, widgetProtoSsEnabled)
AUTO_PROPERTY(QString, comboBoxProtoShadowsocksCipherText)
AUTO_PROPERTY(QString, lineEditProtoShadowsocksPortText)
AUTO_PROPERTY(bool, pushButtonShadowsocksSaveVisible)
AUTO_PROPERTY(bool, progressBarProtoShadowsocksResetVisible)
AUTO_PROPERTY(bool, lineEditProtoShadowsocksPortEnabled)
AUTO_PROPERTY(bool, pageProtoShadowsocksEnabled)
AUTO_PROPERTY(bool, labelProtoShadowsocksInfoVisible)
AUTO_PROPERTY(QString, labelProtoShadowsocksInfoText)
AUTO_PROPERTY(int, progressBarProtoShadowsocksResetValue)
AUTO_PROPERTY(int, progressBarProtoShadowsocksResetMaximium)
public:
Q_INVOKABLE void onPushButtonProtoShadowsocksSaveClicked();
public:
@ -31,66 +31,9 @@ public:
void updateShadowSocksPage(const QJsonObject &ssConfig, DockerContainer container, bool haveAuthData);
QJsonObject getShadowSocksConfigFromPage(QJsonObject oldConfig);
bool getWidgetProtoSsEnabled() const;
void setWidgetProtoSsEnabled(bool widgetProtoSsEnabled);
QString getComboBoxProtoShadowsocksCipherText() const;
void setComboBoxProtoShadowsocksCipherText(const QString &comboBoxProtoShadowsocksCipherText);
QString getLineEditProtoShadowsocksPortText() const;
void setLineEditProtoShadowsocksPortText(const QString &lineEditProtoShadowsocksPortText);
bool getPushButtonProtoShadowsocksSaveVisible() const;
void setPushButtonProtoShadowsocksSaveVisible(bool pushButtonProtoShadowsocksSaveVisible);
bool getProgressBarProtoShadowsocksResetVisible() const;
void setProgressBarProtoShadowsocksResetVisible(bool progressBarProtoShadowsocksResetVisible);
bool getLineEditProtoShadowsocksPortEnabled() const;
void setLineEditProtoShadowsocksPortEnabled(bool lineEditProtoShadowsocksPortEnabled);
bool getPageProtoShadowsocksEnabled() const;
void setPageProtoShadowsocksEnabled(bool pageProtoShadowsocksEnabled);
bool getLabelProtoShadowsocksInfoVisible() const;
void setLabelProtoShadowsocksInfoVisible(bool labelProtoShadowsocksInfoVisible);
QString getLabelProtoShadowsocksInfoText() const;
void setLabelProtoShadowsocksInfoText(const QString &labelProtoShadowsocksInfoText);
int getProgressBarProtoShadowsocksResetValue() const;
void setProgressBarProtoShadowsocksResetValue(int progressBarProtoShadowsocksResetValue);
int getProgressBarProtoShadowsocksResetMaximium() const;
void setProgressBarProtoShadowsocksResetMaximium(int progressBarProtoShadowsocksResetMaximium);
signals:
void widgetProtoSsEnabledChanged();
void comboBoxProtoShadowsocksCipherTextChanged();
void lineEditProtoShadowsocksPortTextChanged();
void pushButtonProtoShadowsocksSaveVisibleChanged();
void progressBarProtoShadowsocksResetVisibleChanged();
void lineEditProtoShadowsocksPortEnabledChanged();
void pageProtoShadowsocksEnabledChanged();
void labelProtoShadowsocksInfoVisibleChanged();
void labelProtoShadowsocksInfoTextChanged();
void progressBarProtoShadowsocksResetValueChanged();
void progressBarProtoShadowsocksResetMaximiumChanged();
private:
private slots:
private:
Settings m_settings;
UiLogic *m_uiLogic;
bool m_widgetProtoSsEnabled;
QString m_comboBoxProtoShadowsocksCipherText;
QString m_lineEditProtoShadowsocksPortText;
bool m_pushButtonProtoShadowsocksSaveVisible;
bool m_progressBarProtoShadowsocksResetVisible;
bool m_lineEditProtoShadowsocksPortEnabled;
bool m_pageProtoShadowsocksEnabled;
bool m_labelProtoShadowsocksInfoVisible;
QString m_labelProtoShadowsocksInfoText;
int m_progressBarProtoShadowsocksResetValue;
int m_progressBarProtoShadowsocksResetMaximium;
};
#endif // SHADOWSOCKS_LOGIC_H