Compare commits
6 Commits
b531f1a693
...
b42595cbbc
Author | SHA1 | Date |
---|---|---|
|
b42595cbbc | |
|
1990203f3b | |
|
df7cd94eec | |
|
2cc17e9db3 | |
|
aa8fcb304f | |
|
cb4ec62c1e |
|
@ -969,10 +969,16 @@ Updated content:
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Buttons.qml" line="222"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
||||||
<source>Loading</source>
|
<source>Loading</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
||||||
|
<source>Normal</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="270"/>
|
<location filename="qml/page/T_Buttons.qml" line="270"/>
|
||||||
<source>Click IconButton</source>
|
<source>Click IconButton</source>
|
||||||
|
@ -2291,39 +2297,39 @@ Some contents...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="45"/>
|
<location filename="qml/page/T_TabView.qml" line="44"/>
|
||||||
<location filename="qml/page/T_TabView.qml" line="47"/>
|
<location filename="qml/page/T_TabView.qml" line="46"/>
|
||||||
<source>Equal</source>
|
<source>Equal</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="54"/>
|
<location filename="qml/page/T_TabView.qml" line="53"/>
|
||||||
<source>SizeToContent</source>
|
<source>SizeToContent</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="61"/>
|
<location filename="qml/page/T_TabView.qml" line="60"/>
|
||||||
<source>Compact</source>
|
<source>Compact</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="69"/>
|
<location filename="qml/page/T_TabView.qml" line="68"/>
|
||||||
<source>Tab Close Button Visibility:</source>
|
<source>Tab Close Button Visibility:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="74"/>
|
<location filename="qml/page/T_TabView.qml" line="72"/>
|
||||||
<location filename="qml/page/T_TabView.qml" line="84"/>
|
<location filename="qml/page/T_TabView.qml" line="82"/>
|
||||||
<source>Always</source>
|
<source>Always</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="77"/>
|
<location filename="qml/page/T_TabView.qml" line="75"/>
|
||||||
<source>Never</source>
|
<source>Never</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="91"/>
|
<location filename="qml/page/T_TabView.qml" line="89"/>
|
||||||
<source>OnHover</source>
|
<source>OnHover</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -995,10 +995,16 @@ Updated content:
|
||||||
<translation type="unfinished">加载按钮</translation>
|
<translation type="unfinished">加载按钮</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="qml/page/T_Buttons.qml" line="222"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
||||||
<source>Loading</source>
|
<source>Loading</source>
|
||||||
<translation type="unfinished">正在加载</translation>
|
<translation type="unfinished">正在加载</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="qml/page/T_Buttons.qml" line="238"/>
|
||||||
|
<source>Normal</source>
|
||||||
|
<translation type="unfinished">开启加载</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="270"/>
|
<location filename="qml/page/T_Buttons.qml" line="270"/>
|
||||||
<source>Click IconButton</source>
|
<source>Click IconButton</source>
|
||||||
|
@ -2480,39 +2486,39 @@ Some contents...</source>
|
||||||
<translation type="unfinished">选项卡宽度:</translation>
|
<translation type="unfinished">选项卡宽度:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="45"/>
|
<location filename="qml/page/T_TabView.qml" line="44"/>
|
||||||
<location filename="qml/page/T_TabView.qml" line="47"/>
|
<location filename="qml/page/T_TabView.qml" line="46"/>
|
||||||
<source>Equal</source>
|
<source>Equal</source>
|
||||||
<translation type="unfinished">相同宽度</translation>
|
<translation type="unfinished">相同宽度</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="54"/>
|
<location filename="qml/page/T_TabView.qml" line="53"/>
|
||||||
<source>SizeToContent</source>
|
<source>SizeToContent</source>
|
||||||
<translation type="unfinished">由内容</translation>
|
<translation type="unfinished">由内容</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="61"/>
|
<location filename="qml/page/T_TabView.qml" line="60"/>
|
||||||
<source>Compact</source>
|
<source>Compact</source>
|
||||||
<translation type="unfinished">紧凑</translation>
|
<translation type="unfinished">紧凑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="69"/>
|
<location filename="qml/page/T_TabView.qml" line="68"/>
|
||||||
<source>Tab Close Button Visibility:</source>
|
<source>Tab Close Button Visibility:</source>
|
||||||
<translation type="unfinished">选项卡关闭按钮可见性:</translation>
|
<translation type="unfinished">选项卡关闭按钮可见性:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="74"/>
|
<location filename="qml/page/T_TabView.qml" line="72"/>
|
||||||
<location filename="qml/page/T_TabView.qml" line="84"/>
|
<location filename="qml/page/T_TabView.qml" line="82"/>
|
||||||
<source>Always</source>
|
<source>Always</source>
|
||||||
<translation type="unfinished">可见</translation>
|
<translation type="unfinished">可见</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="77"/>
|
<location filename="qml/page/T_TabView.qml" line="75"/>
|
||||||
<source>Never</source>
|
<source>Never</source>
|
||||||
<translation type="unfinished">不可见</translation>
|
<translation type="unfinished">不可见</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_TabView.qml" line="91"/>
|
<location filename="qml/page/T_TabView.qml" line="89"/>
|
||||||
<source>OnHover</source>
|
<source>OnHover</source>
|
||||||
<translation type="unfinished">鼠标悬浮显示</translation>
|
<translation type="unfinished">鼠标悬浮显示</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -219,7 +219,7 @@ FluScrollablePage{
|
||||||
FluLoadingButton{
|
FluLoadingButton{
|
||||||
id: btn_loading
|
id: btn_loading
|
||||||
loading: loading_button_switch.checked
|
loading: loading_button_switch.checked
|
||||||
text: qsTr("Loading Button")
|
text: loading_button_switch.checked ? qsTr("Loading") : qsTr("Loading Button")
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -235,7 +235,7 @@ FluScrollablePage{
|
||||||
right: parent.right
|
right: parent.right
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
text: qsTr("Loading")
|
text: loading_button_switch.checked ? qsTr("Loading") : qsTr("Normal")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
|
|
|
@ -13,6 +13,6 @@ class AppInfo : public QObject {
|
||||||
explicit AppInfo(QObject *parent = nullptr);
|
explicit AppInfo(QObject *parent = nullptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SINGLETON(AppInfo)
|
EXAMPLESINGLETON(AppInfo)
|
||||||
[[maybe_unused]] Q_INVOKABLE void testCrash();
|
[[maybe_unused]] Q_INVOKABLE void testCrash();
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ private:
|
||||||
void templateToFile(const QString &source, const QString &dest, Args &&...args);
|
void templateToFile(const QString &source, const QString &dest, Args &&...args);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SINGLETON(InitializrHelper)
|
EXAMPLESINGLETON(InitializrHelper)
|
||||||
~InitializrHelper() override;
|
~InitializrHelper() override;
|
||||||
[[maybe_unused]] Q_INVOKABLE void generate(const QString &name, const QString &path);
|
[[maybe_unused]] Q_INVOKABLE void generate(const QString &name, const QString &path);
|
||||||
Q_SIGNAL void error(const QString &message);
|
Q_SIGNAL void error(const QString &message);
|
||||||
|
|
|
@ -144,7 +144,7 @@ private:
|
||||||
explicit Network(QObject *parent = nullptr);
|
explicit Network(QObject *parent = nullptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SINGLETON(Network)
|
EXAMPLESINGLETON(Network)
|
||||||
|
|
||||||
static Network *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
|
static Network *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
|
||||||
return getInstance();
|
return getInstance();
|
||||||
|
|
|
@ -15,7 +15,7 @@ private:
|
||||||
explicit SettingsHelper(QObject *parent = nullptr);
|
explicit SettingsHelper(QObject *parent = nullptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SINGLETON(SettingsHelper)
|
EXAMPLESINGLETON(SettingsHelper)
|
||||||
~SettingsHelper() override;
|
~SettingsHelper() override;
|
||||||
void init(char *argv[]);
|
void init(char *argv[]);
|
||||||
Q_INVOKABLE void saveDarkMode(int darkModel) {
|
Q_INVOKABLE void saveDarkMode(int darkModel) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ private:
|
||||||
[[maybe_unused]] explicit TranslateHelper(QObject *parent = nullptr);
|
[[maybe_unused]] explicit TranslateHelper(QObject *parent = nullptr);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SINGLETON(TranslateHelper)
|
EXAMPLESINGLETON(TranslateHelper)
|
||||||
~TranslateHelper() override;
|
~TranslateHelper() override;
|
||||||
void init(QQmlEngine *engine);
|
void init(QQmlEngine *engine);
|
||||||
|
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
* @brief The Singleton class
|
* @brief The Singleton class
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Singleton {
|
class ExampleSingleton {
|
||||||
public:
|
public:
|
||||||
static T *getInstance();
|
static T *getInstance();
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T *Singleton<T>::getInstance() {
|
T *ExampleSingleton<T>::getInstance() {
|
||||||
static T *instance = new T();
|
static T *instance = new T();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SINGLETON(Class) \
|
#define EXAMPLESINGLETON(Class) \
|
||||||
private: \
|
private: \
|
||||||
friend class Singleton<Class>; \
|
friend class ExampleSingleton<Class>; \
|
||||||
\
|
\
|
||||||
public: \
|
public: \
|
||||||
static Class *getInstance() { \
|
static Class *getInstance() { \
|
||||||
return Singleton<Class>::getInstance(); \
|
return ExampleSingleton<Class>::getInstance(); \
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ void FluTreeModel::checkRow(int row, bool checked) {
|
||||||
void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
|
void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
|
||||||
_dataSource.clear();
|
_dataSource.clear();
|
||||||
if (_root) {
|
if (_root) {
|
||||||
delete _root;
|
_root->deleteLater();
|
||||||
_root = nullptr;
|
_root = nullptr;
|
||||||
}
|
}
|
||||||
_root = new FluTreeNode(this);
|
_root = new FluTreeNode(this);
|
||||||
|
@ -115,7 +115,7 @@ void FluTreeModel::setDataSource(QList<QMap<QString, QVariant>> data) {
|
||||||
while (data.count() > 0) {
|
while (data.count() > 0) {
|
||||||
auto item = data.at(data.count() - 1);
|
auto item = data.at(data.count() - 1);
|
||||||
data.pop_back();
|
data.pop_back();
|
||||||
auto *node = new FluTreeNode(this);
|
auto *node = new FluTreeNode(_root);
|
||||||
node->_depth = item.value("__depth").toInt();
|
node->_depth = item.value("__depth").toInt();
|
||||||
node->_parent = item.value("__parent").value<FluTreeNode *>();
|
node->_parent = item.value("__parent").value<FluTreeNode *>();
|
||||||
node->_data = item;
|
node->_data = item;
|
||||||
|
|
|
@ -474,6 +474,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
active: rowModel !== undefined && rowModel !== null
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
if(column === 0)
|
if(column === 0)
|
||||||
return com_column
|
return com_column
|
||||||
|
|
|
@ -474,6 +474,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
active: rowModel !== undefined && rowModel !== null
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
if(column === 0)
|
if(column === 0)
|
||||||
return com_column
|
return com_column
|
||||||
|
|
Loading…
Reference in New Issue