This commit is contained in:
朱子楚\zhuzi 2024-05-17 21:19:10 +08:00
parent 39f58278ff
commit 7a67ccc1e1
10 changed files with 92 additions and 85 deletions

View File

@ -2043,108 +2043,108 @@ Some contents...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="73"/>
<location filename="qml/page/T_TableView.qml" line="72"/>
<source>Modify the column name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="74"/>
<location filename="qml/page/T_TableView.qml" line="73"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="92"/>
<location filename="qml/page/T_TableView.qml" line="91"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="134"/>
<location filename="qml/page/T_TableView.qml" line="133"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="177"/>
<location filename="qml/page/T_TableView.qml" line="509"/>
<location filename="qml/page/T_TableView.qml" line="176"/>
<location filename="qml/page/T_TableView.qml" line="508"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="211"/>
<location filename="qml/page/T_TableView.qml" line="210"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="218"/>
<location filename="qml/page/T_TableView.qml" line="217"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="237"/>
<location filename="qml/page/T_TableView.qml" line="236"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="365"/>
<location filename="qml/page/T_TableView.qml" line="364"/>
<source>Age</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="440"/>
<location filename="qml/page/T_TableView.qml" line="439"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="447"/>
<location filename="qml/page/T_TableView.qml" line="446"/>
<source>Delete Selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="470"/>
<location filename="qml/page/T_TableView.qml" line="469"/>
<source>Add a row of Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="476"/>
<location filename="qml/page/T_TableView.qml" line="475"/>
<source>Insert a Row</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="483"/>
<location filename="qml/page/T_TableView.qml" line="482"/>
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="514"/>
<location filename="qml/page/T_TableView.qml" line="513"/>
<source>Avatar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="528"/>
<location filename="qml/page/T_TableView.qml" line="527"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="536"/>
<location filename="qml/page/T_TableView.qml" line="535"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="543"/>
<location filename="qml/page/T_TableView.qml" line="542"/>
<source>Long String</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="551"/>
<location filename="qml/page/T_TableView.qml" line="550"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="569"/>
<location filename="qml/page/T_TableView.qml" line="568"/>
<source>&lt;Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="570"/>
<location filename="qml/page/T_TableView.qml" line="569"/>
<source>Next&gt;</source>
<translation type="unfinished"></translation>
</message>

View File

@ -2193,108 +2193,108 @@ Some contents...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="73"/>
<location filename="qml/page/T_TableView.qml" line="72"/>
<source>Modify the column name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="74"/>
<location filename="qml/page/T_TableView.qml" line="73"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="92"/>
<location filename="qml/page/T_TableView.qml" line="91"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="134"/>
<location filename="qml/page/T_TableView.qml" line="133"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="177"/>
<location filename="qml/page/T_TableView.qml" line="509"/>
<location filename="qml/page/T_TableView.qml" line="176"/>
<location filename="qml/page/T_TableView.qml" line="508"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="211"/>
<location filename="qml/page/T_TableView.qml" line="210"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="218"/>
<location filename="qml/page/T_TableView.qml" line="217"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="237"/>
<location filename="qml/page/T_TableView.qml" line="236"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="365"/>
<location filename="qml/page/T_TableView.qml" line="364"/>
<source>Age</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="440"/>
<location filename="qml/page/T_TableView.qml" line="439"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="476"/>
<location filename="qml/page/T_TableView.qml" line="475"/>
<source>Insert a Row</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="483"/>
<location filename="qml/page/T_TableView.qml" line="482"/>
<source>Focus not acquired: Please click any item in the form as the target for insertion!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="514"/>
<location filename="qml/page/T_TableView.qml" line="513"/>
<source>Avatar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="528"/>
<location filename="qml/page/T_TableView.qml" line="527"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="536"/>
<location filename="qml/page/T_TableView.qml" line="535"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="543"/>
<location filename="qml/page/T_TableView.qml" line="542"/>
<source>Long String</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="551"/>
<location filename="qml/page/T_TableView.qml" line="550"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="569"/>
<location filename="qml/page/T_TableView.qml" line="568"/>
<source>&lt;Previous</source>
<translation type="unfinished">&lt;</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="570"/>
<location filename="qml/page/T_TableView.qml" line="569"/>
<source>Next&gt;</source>
<translation type="unfinished">&gt;</translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="447"/>
<location filename="qml/page/T_TableView.qml" line="446"/>
<source>Delete Selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_TableView.qml" line="470"/>
<location filename="qml/page/T_TableView.qml" line="469"/>
<source>Add a row of Data</source>
<translation type="unfinished"></translation>
</message>

View File

@ -40,5 +40,3 @@ FluScrollablePage{
}
}

View File

@ -11,7 +11,6 @@ FluContentPage{
title: qsTr("TableView")
signal checkBoxChanged
property var dataSource : []
property int sortType: 0
property bool selectedAll: true
property string nameKeyword: ""
@ -621,7 +620,6 @@ FluContentPage{
for(var i=0;i<count;i++){
dataSource.push(genTestObject())
}
root.dataSource = dataSource
table_view.dataSource = root.dataSource
table_view.dataSource = dataSource
}
}

View File

@ -273,16 +273,8 @@ void FluFrameless::componentComplete() {
return true;
#endif
} else if (uMsg == WM_NCACTIVATE) {
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
*result = TRUE;
return true;
#else
if (isCompositionEnabled()) {
return false;
}
*result = TRUE;
return true;
#endif
} else if (uMsg == WM_GETMINMAXINFO) {
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);

View File

@ -150,20 +150,35 @@ void FluentUI::registerTypes(const char *uri) const {
qmlRegisterUncreatableMetaObject(FluTimelineType::staticMetaObject, uri, major, minor, "FluTimelineType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluSheetType::staticMetaObject, uri, major, minor, "FluSheetType", "Access to enums & flags only");
qmlRegisterSingletonType(uri, major, minor, "FluApp", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
Q_UNUSED(engine)
return scriptEngine->newQObject(FluApp::getInstance());
});
qmlRegisterSingletonType(uri, major, minor, "FluColors", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
Q_UNUSED(engine)
return scriptEngine->newQObject(FluColors::getInstance());
});
qmlRegisterSingletonType(uri, major, minor, "FluTheme", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
Q_UNUSED(engine)
return scriptEngine->newQObject(FluTheme::getInstance());
});
qmlRegisterSingletonType(uri, major, minor, "FluTools", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
Q_UNUSED(engine)
return scriptEngine->newQObject(FluTools::getInstance());
});
qmlRegisterSingletonType(uri, major, minor, "FluTextStyle", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QJSValue {
Q_UNUSED(engine)
return scriptEngine->newQObject(FluTextStyle::getInstance());
});
// qmlRegisterSingletonInstance(uri, major, minor, "FluApp", FluApp::getInstance());
// qmlRegisterSingletonInstance(uri, major, minor, "FluColors", FluColors::getInstance());
// qmlRegisterSingletonInstance(uri, major, minor, "FluTheme", FluTheme::getInstance());
// qmlRegisterSingletonInstance(uri, major, minor, "FluTools", FluTools::getInstance());
// qmlRegisterSingletonInstance(uri, major, minor, "FluTextStyle", FluTextStyle::getInstance());
qmlRegisterModule(uri, major, minor);
#endif
}
void FluentUI::initializeEngine(QQmlEngine *engine, [[maybe_unused]] const char *uri) {
engine->rootContext()->setContextProperty("FluApp", FluApp::getInstance());
engine->rootContext()->setContextProperty("FluColors", FluColors::getInstance());
engine->rootContext()->setContextProperty("FluTheme", FluTheme::getInstance());
engine->rootContext()->setContextProperty("FluTools", FluTools::getInstance());
engine->rootContext()->setContextProperty("FluTextStyle", FluTextStyle::getInstance());
Q_UNUSED(engine)
}

View File

@ -10,19 +10,19 @@ QtObject {
windows.push(window)
}
}
function removeWindow(window) {
if(!window.transientParent){
var index = windows.indexOf(window)
function removeWindow(win) {
if(!win.transientParent){
var index = windows.indexOf(win)
if (index !== -1) {
windows.splice(index, 1)
FluTools.deleteLater(window)
win.deleteLater()
}
}
}
function exit(retCode){
for(var i =0 ;i< windows.length; i++){
var item = windows[i]
FluTools.deleteLater(item)
var win = windows[i]
win.deleteLater()
}
windows = []
Qt.exit(retCode)

View File

@ -353,4 +353,7 @@ Window {
function setHitTestVisible(val){
frameless.setHitTestVisible(val)
}
function deleteLater(){
FluTools.deleteLater(window)
}
}

View File

@ -11,19 +11,19 @@ QtObject {
windows.push(window)
}
}
function removeWindow(window) {
if(!window.transientParent){
var index = windows.indexOf(window)
function removeWindow(win) {
if(!win.transientParent){
var index = windows.indexOf(win)
if (index !== -1) {
windows.splice(index, 1)
FluTools.deleteLater(window)
win.deleteLater()
}
}
}
function exit(retCode){
for(var i =0 ;i< windows.length; i++){
var item = windows[i]
FluTools.deleteLater(item)
var win = windows[i]
win.deleteLater()
}
windows = []
Qt.exit(retCode)
@ -56,9 +56,7 @@ QtObject {
var launchMode = win.launchMode
if(launchMode === 1){
win.argument = argument
if(!win.visible){
win.visible = true
}
win.show()
win.raise()
win.requestActivate()
return

View File

@ -352,4 +352,7 @@ Window {
function setHitTestVisible(val){
frameless.setHitTestVisible(val)
}
function deleteLater(){
FluTools.deleteLater(window)
}
}