/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
.pragma library
var daysInAWeek = 7;
var monthsInAYear = 12;
// Not the number of weeks per month, but the number of weeks that are
// shown on a typical calendar.
var weeksOnACalendarMonth = 6;
// Can't create year 1 directly...
var minimumCalendarDate = new Date(-1, 0, 1);
minimumCalendarDate.setFullYear(minimumCalendarDate.getFullYear() + 2);
var maximumCalendarDate = new Date(275759, 9, 25);
function daysInMonth(date) {
// Passing 0 as the day will give us the previous month, which will be
// date.getMonth() since we added 1 to it.
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
}
/*!
Returns a copy of \a date with its month set to \a month, keeping the same
day if possible. Does not modify \a date.
*/
function setMonth(date, month) {
var oldDay = date.getDate();
var newDate = new Date(date);
// Set the day first, because setting the month could cause it to skip ahead
// a month if the day is larger than the latest day in that month.
newDate.setDate(1);
newDate.setMonth(month);
// We'd like to have the previous day still selected when we change
// months, but it might not be possible, so use the smallest of the two.
newDate.setDate(Math.min(oldDay, daysInMonth(newDate)));
return newDate;
}
/*!
Returns the cell rectangle for the cell at the given \a index, assuming
that the grid has a number of columns equal to \a columns and rows
equal to \a rows, with an available width of \a availableWidth and height
of \a availableHeight.
If \a gridLineWidth is greater than \c 0, the cell rectangle will be
calculated under the assumption that there is a grid between the cells:
31 | 1 | 2 | 3 | 4 | 5 | 6
--------------------------------
7 | 8 | 9 | 10 | 11 | 12 | 13
--------------------------------
14 | 15 | 16 | 17 | 18 | 19 | 20
--------------------------------
21 | 22 | 23 | 24 | 25 | 26 | 27
--------------------------------
28 | 29 | 30 | 31 | 1 | 2 | 3
--------------------------------
4 | 5 | 6 | 7 | 8 | 9 | 10
*/
function cellRectAt(index, columns, rows, availableWidth, availableHeight, gridLineWidth) {
var col = Math.floor(index % columns);
var row = Math.floor(index / columns);
var availableWidthMinusGridLines = availableWidth - ((columns - 1) * gridLineWidth);
var availableHeightMinusGridLines = availableHeight - ((rows - 1) * gridLineWidth);
var remainingHorizontalSpace = Math.floor(availableWidthMinusGridLines % columns);
var remainingVerticalSpace = Math.floor(availableHeightMinusGridLines % rows);
var baseCellWidth = Math.floor(availableWidthMinusGridLines / columns);
var baseCellHeight = Math.floor(availableHeightMinusGridLines / rows);
var rect = Qt.rect(0, 0, 0, 0);
rect.x = baseCellWidth * col;
rect.width = baseCellWidth;
if (remainingHorizontalSpace > 0) {
if (col < remainingHorizontalSpace) {
++rect.width;
}
// This cell's x position should be increased by 1 for every column above it.
rect.x += Math.min(remainingHorizontalSpace, col);
}
rect.y = baseCellHeight * row;
rect.height = baseCellHeight;
if (remainingVerticalSpace > 0) {
if (row < remainingVerticalSpace) {
++rect.height;
}
// This cell's y position should be increased by 1 for every row above it.
rect.y += Math.min(remainingVerticalSpace, row);
}
rect.x += col * gridLineWidth;
rect.y += row * gridLineWidth;
return rect;
}
没有合适的资源?快使用搜索试试~ 我知道了~
Qtdesigner5.2
共1847个文件
qml:741个
png:259个
qm:245个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 119 浏览量
2024-01-24
14:50:45
上传
评论
收藏 95.78MB ZIP 举报
温馨提示
Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesigner5.2Qtdesi
资源推荐
资源详情
资源评论
收起资源包目录
Qtdesigner5.2 (1847个子文件)
qt.conf 20B
icudtl.dat 10.02MB
Qt5WebEngineCore.dll 71.6MB
opengl32sw.dll 15.25MB
Qt5Gui.dll 5.62MB
Qt5Core.dll 5.13MB
Qt5Widgets.dll 4.25MB
Qt5Pdf.dll 3.84MB
Qt5Designer.dll 3.8MB
Qt5Quick.dll 3.33MB
d3dcompiler_47.dll 3.31MB
Qt5Qml.dll 2.84MB
libGLESv2.dll 2.8MB
Qt5XmlPatterns.dll 2.21MB
Qt5VirtualKeyboard.dll 1.95MB
Qt53DRender.dll 1.82MB
qtquickcontrols2imaginestyleplugin.dll 1.52MB
Qt5DesignerComponents.dll 1.45MB
qtvirtualkeyboard_openwnn.dll 1.42MB
assimp.dll 1.34MB
Qt5Location.dll 1.28MB
qdirect2d.dll 1.21MB
qwindows.dll 1.16MB
Qt5Script.dll 1.11MB
Qt5Charts.dll 1.11MB
qtvirtualkeyboard_pinyin.dll 1.1MB
qsqlite.dll 1.06MB
Qt5Quick3DRuntimeRender.dll 1.05MB
Qt5Network.dll 1MB
Qt5DataVisualization.dll 951KB
Qt5QuickTemplates2.dll 920KB
qtquickextrasflatplugin.dll 805KB
qtquickcontrols2materialstyleplugin.dll 714KB
qminimal.dll 685KB
openglrenderer.dll 636KB
qoffscreen.dll 614KB
qtquickcontrols2plugin.dll 610KB
qtquickcontrols2fusionstyleplugin.dll 586KB
Qt5Multimedia.dll 579KB
qtquickcontrols2universalstyleplugin.dll 578KB
Qt53DExtras.dll 563KB
Qt5ScriptTools.dll 446KB
Qt5Quick3D.dll 435KB
Qt5Bluetooth.dll 433KB
qwebp.dll 403KB
qtchartsqml2.dll 399KB
qwebgl.dll 397KB
Qt5QuickParticles.dll 390KB
Qt5RemoteObjects.dll 368KB
qjpeg.dll 365KB
qtiff.dll 345KB
Qt5QmlModels.dll 342KB
Qt5DBus.dll 337KB
Qt5Help.dll 334KB
Qt53DAnimation.dll 321KB
qtgeoservices_mapbox.dll 320KB
Qt53DCore.dll 320KB
Qt5WebEngine.dll 310KB
uip.dll 310KB
qtquicktemplates2plugin.dll 299KB
Qt5Scxml.dll 288KB
qtvirtualkeyboard_tcime.dll 277KB
qtquickcontrolsplugin.dll 272KB
Qt53DInput.dll 268KB
Qt5OpenGL.dll 264KB
Qt5PrintSupport.dll 261KB
Qt5Svg.dll 258KB
Qt5Positioning.dll 254KB
qsgd3d12backend.dll 252KB
quick3drenderplugin.dll 248KB
dsengine.dll 243KB
qtgeoservices_nokia.dll 239KB
declarative_multimedia.dll 235KB
datavisualizationqml2.dll 228KB
Qt5Test.dll 219KB
qaxwidget.dll 217KB
Qt5WebEngineWidgets.dll 198KB
Qt5WinExtras.dll 198KB
qtlabsplatformplugin.dll 183KB
Qt5Quick3DRender.dll 177KB
Qt5QuickShapes.dll 176KB
Qt5Xml.dll 170KB
wmfengine.dll 169KB
Qt5SerialBus.dll 166KB
Qt5Sensors.dll 162KB
gltfsceneimport.dll 162KB
Qt5Sql.dll 160KB
declarative_sensors.dll 159KB
gltfsceneexport.dll 157KB
qtgeoservices_osm.dll 157KB
Qt5Bodymovin.dll 152KB
declarative_location.dll 150KB
Qt53DQuick.dll 140KB
Qt5QuickControls2.dll 140KB
qwindowsvistastyle.dll 130KB
Qt53DQuickRender.dll 129KB
Qt5NetworkAuth.dll 121KB
qtgeoservices_esri.dll 120KB
Qt5WebSockets.dll 119KB
dialogplugin.dll 117KB
共 1847 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
东方佑
- 粉丝: 6674
- 资源: 312
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功