mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 13:49:08 +08:00
update
This commit is contained in:
parent
39f58278ff
commit
7a67ccc1e1
@ -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><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></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -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><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></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>
|
||||
|
@ -40,5 +40,3 @@ FluScrollablePage{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -136,9 +136,9 @@ void FluFrameless::componentComplete() {
|
||||
if (_fixSize) {
|
||||
window()->setMaximumSize(QSize(w, h));
|
||||
window()->setMinimumSize(QSize(w, h));
|
||||
}else{
|
||||
window()->setMinimumHeight(window()->minimumHeight()+appBarHeight);
|
||||
window()->setMaximumHeight(window()->maximumHeight()+appBarHeight);
|
||||
} else {
|
||||
window()->setMinimumHeight(window()->minimumHeight() + appBarHeight);
|
||||
window()->setMaximumHeight(window()->maximumHeight() + appBarHeight);
|
||||
}
|
||||
window()->resize(QSize(w, h));
|
||||
connect(this, &FluFrameless::topmostChanged, this, [this] {
|
||||
@ -192,8 +192,8 @@ void FluFrameless::componentComplete() {
|
||||
bool isMaximum = ::IsZoomed(hwnd);
|
||||
if (isMaximum) {
|
||||
auto geometry = window()->screen()->geometry();
|
||||
auto offsetX = qAbs(geometry.left()-originalLeft);
|
||||
auto offsetY = qAbs(geometry.top()-originalTop);
|
||||
auto offsetX = qAbs(geometry.left() - originalLeft);
|
||||
auto offsetY = qAbs(geometry.top() - originalTop);
|
||||
clientRect->top = originalTop + offsetY;
|
||||
clientRect->bottom = originalBottom - offsetY;
|
||||
clientRect->left = originalLeft + offsetX;
|
||||
@ -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);
|
||||
@ -406,13 +398,13 @@ bool FluFrameless::_hitMaximizeButton() {
|
||||
}
|
||||
|
||||
void FluFrameless::_setMaximizePressed(bool val) {
|
||||
if(_maximizeButton){
|
||||
if (_maximizeButton) {
|
||||
_maximizeButton->setProperty("down", val);
|
||||
}
|
||||
}
|
||||
|
||||
void FluFrameless::_setMaximizeHovered(bool val) {
|
||||
if(_maximizeButton){
|
||||
if (_maximizeButton) {
|
||||
_maximizeButton->setProperty("hover", val);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -353,4 +353,7 @@ Window {
|
||||
function setHitTestVisible(val){
|
||||
frameless.setHitTestVisible(val)
|
||||
}
|
||||
function deleteLater(){
|
||||
FluTools.deleteLater(window)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -352,4 +352,7 @@ Window {
|
||||
function setHitTestVisible(val){
|
||||
frameless.setHitTestVisible(val)
|
||||
}
|
||||
function deleteLater(){
|
||||
FluTools.deleteLater(window)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user