mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-03 03:10:04 +02:00

- qt4->qt5 - in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake - made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions for qrect constr. - qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms - docking option enabled by default, removed option to disable docking feature from "Mode" - added qVersionResolve utility functions to handle compatibility before and after qt5.12 - qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks - ensure gain plots have no zooming of z axis in 2d and y axis in 1d - removed placeholder text in qpalette in main window form as its not supportd until 5.12 (so using qt5.9 designer insted of qt5.15 to cope) - tab order Servers: - fixed some error messages that were empty for fail in funcs (mostly minor as if this error, major issues)
690 lines
34 KiB
HTML
690 lines
34 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.16"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Qwt User's Guide: QwtDate Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(initResizable);
|
|
/* @license-end */</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Qwt User's Guide
|
|
 <span id="projectnumber">6.1.5</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.16 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('class_qwt_date.html','');});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="class_qwt_date-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">QwtDate Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>A collection of methods around date/time values.
|
|
<a href="class_qwt_date.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="qwt__date_8h_source.html">qwt_date.h</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:ab915db512c556a4666ada4fbfccfce1e"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> { <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d">FirstThursday</a>,
|
|
<a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6">FirstDay</a>
|
|
}</td></tr>
|
|
<tr class="separator:ab915db512c556a4666ada4fbfccfce1e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad037b999a51cae4d9ab36bf8e7859587"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> { <br />
|
|
  <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a4e1d45d6382c27689a30adc11186d4f1">Millisecond</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587aabaf7a7d45288a33590f61fe075b3590">Second</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a7c9073c66b2628adbe772ac4c1a678ef">Minute</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a8e7a2f91f89423e446bfdaa1e01ebd2f">Hour</a>,
|
|
<br />
|
|
  <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a1d503616cab082a9c741be881cc0a813">Day</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587ae204b4e8ce8679ba9ac378e41bd77b2b">Week</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a0ab43f35f1bdbae7536be2be0455700a">Month</a>,
|
|
<a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587ae306523ed94ccf930afb811ff7a735ab">Year</a>
|
|
<br />
|
|
}</td></tr>
|
|
<tr class="separator:ad037b999a51cae4d9ab36bf8e7859587"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af636fffdebea2e4463fc32461b1217e0"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="class_qwt_date.html#af636fffdebea2e4463fc32461b1217e0aed8ee8f3dbc5b7a5e953b3ec51a79108">JulianDayForEpoch</a> = 2440588
|
|
}</td></tr>
|
|
<tr class="separator:af636fffdebea2e4463fc32461b1217e0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a9ab1845543957472c2c6529ad03ef98d"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a9ab1845543957472c2c6529ad03ef98d">minDate</a> ()</td></tr>
|
|
<tr class="separator:a9ab1845543957472c2c6529ad03ef98d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af82ba26011550602f1adb61da53bd830"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#af82ba26011550602f1adb61da53bd830">maxDate</a> ()</td></tr>
|
|
<tr class="separator:af82ba26011550602f1adb61da53bd830"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8039dc115458981fc1c7fc2c0aa8d053"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a8039dc115458981fc1c7fc2c0aa8d053">toDateTime</a> (double value, Qt::TimeSpec=Qt::UTC)</td></tr>
|
|
<tr class="separator:a8039dc115458981fc1c7fc2c0aa8d053"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afce10fd70f7a1ecac3f97776fb2dc46a"><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#afce10fd70f7a1ecac3f97776fb2dc46a">toDouble</a> (const QDateTime &)</td></tr>
|
|
<tr class="separator:afce10fd70f7a1ecac3f97776fb2dc46a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab4d7b043971e13a97a8b5f9edb5eee02"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ab4d7b043971e13a97a8b5f9edb5eee02">ceil</a> (const QDateTime &, <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a>)</td></tr>
|
|
<tr class="separator:ab4d7b043971e13a97a8b5f9edb5eee02"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1b350f22a57b44b529bc4de740dbe213"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor</a> (const QDateTime &, <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a>)</td></tr>
|
|
<tr class="separator:a1b350f22a57b44b529bc4de740dbe213"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abb91fb441a254337d5445ad4bab1a662"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662">dateOfWeek0</a> (int year, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
|
|
<tr class="memdesc:abb91fb441a254337d5445ad4bab1a662"><td class="mdescLeft"> </td><td class="mdescRight">Date of the first day of the first week for a year. <a href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662">More...</a><br /></td></tr>
|
|
<tr class="separator:abb91fb441a254337d5445ad4bab1a662"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a90dd1f9dc38565c003f8e1ef821965b7"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber</a> (const QDate &, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
|
|
<tr class="separator:a90dd1f9dc38565c003f8e1ef821965b7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeadce3496f631eae3a7e54749078c7a4"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#aeadce3496f631eae3a7e54749078c7a4">utcOffset</a> (const QDateTime &)</td></tr>
|
|
<tr class="separator:aeadce3496f631eae3a7e54749078c7a4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2c19998281321ba078d717f7f9ec6855"><td class="memItemLeft" align="right" valign="top">static QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a2c19998281321ba078d717f7f9ec6855">toString</a> (const QDateTime &, const QString &format, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
|
|
<tr class="separator:a2c19998281321ba078d717f7f9ec6855"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A collection of methods around date/time values. </p>
|
|
<p>Qt offers convenient classes for dealing with date/time values, but Qwt uses coordinate systems that are based on doubles. <a class="el" href="class_qwt_date.html" title="A collection of methods around date/time values.">QwtDate</a> offers methods to translate from QDateTime to double and v.v.</p>
|
|
<p>A double is interpreted as the number of milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time - also known as "The Epoch".</p>
|
|
<p>While the range of the Julian day in Qt4 is limited to [0, MAX_INT], Qt5 stores it as qint64 offering a huge range of valid dates. As the significance of a double is below this ( assuming a fraction of 52 bits ) the translation is not bijective with rounding errors for dates very far from Epoch. For a resolution of 1 ms those start to happen for dates above the year 144683.</p>
|
|
<p>An axis for a date/time interval is expected to be aligned and divided in time/date units like seconds, minutes, ... <a class="el" href="class_qwt_date.html" title="A collection of methods around date/time values.">QwtDate</a> offers several algorithms that are needed to calculate these axes.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date_scale_engine.html" title="A scale engine for date/time values.">QwtDateScaleEngine</a>, <a class="el" href="class_qwt_date_scale_draw.html" title="A class for drawing datetime scales.">QwtDateScaleDraw</a>, QDate, QTime </dd></dl>
|
|
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
|
|
<a id="af636fffdebea2e4463fc32461b1217e0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af636fffdebea2e4463fc32461b1217e0">◆ </a></span>anonymous enum</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">anonymous enum</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af636fffdebea2e4463fc32461b1217e0aed8ee8f3dbc5b7a5e953b3ec51a79108"></a>JulianDayForEpoch </td><td class="fielddoc"><p>The Julian day of "The Epoch". </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad037b999a51cae4d9ab36bf8e7859587"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad037b999a51cae4d9ab36bf8e7859587">◆ </a></span>IntervalType</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">QwtDate::IntervalType</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Classification of an time interval</p>
|
|
<p>Time intervals needs to be classified to decide how to align and divide it. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a4e1d45d6382c27689a30adc11186d4f1"></a>Millisecond </td><td class="fielddoc"><p>The interval is related to milliseconds. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587aabaf7a7d45288a33590f61fe075b3590"></a>Second </td><td class="fielddoc"><p>The interval is related to seconds. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a7c9073c66b2628adbe772ac4c1a678ef"></a>Minute </td><td class="fielddoc"><p>The interval is related to minutes. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a8e7a2f91f89423e446bfdaa1e01ebd2f"></a>Hour </td><td class="fielddoc"><p>The interval is related to hours. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a1d503616cab082a9c741be881cc0a813"></a>Day </td><td class="fielddoc"><p>The interval is related to days. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587ae204b4e8ce8679ba9ac378e41bd77b2b"></a>Week </td><td class="fielddoc"><p>The interval is related to weeks. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a0ab43f35f1bdbae7536be2be0455700a"></a>Month </td><td class="fielddoc"><p>The interval is related to months. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587ae306523ed94ccf930afb811ff7a735ab"></a>Year </td><td class="fielddoc"><p>The interval is related to years. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab915db512c556a4666ada4fbfccfce1e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab915db512c556a4666ada4fbfccfce1e">◆ </a></span>Week0Type</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">QwtDate::Week0Type</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>How to identify the first week of year differs between countries. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d"></a>FirstThursday </td><td class="fielddoc"><p>According to ISO 8601 the first week of a year is defined as "the week with the year's first Thursday in it".</p>
|
|
<p>FirstThursday corresponds to the numbering that is implemented in QDate::weekNumber(). </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6"></a>FirstDay </td><td class="fielddoc"><p>"The week with January 1.1 in it."</p>
|
|
<p>In the U.S. this definition is more common than FirstThursday. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="ab4d7b043971e13a97a8b5f9edb5eee02"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab4d7b043971e13a97a8b5f9edb5eee02">◆ </a></span>ceil()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDateTime QwtDate::ceil </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDateTime & </td>
|
|
<td class="paramname"><em>dateTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> </td>
|
|
<td class="paramname"><em>intervalType</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Ceil a datetime according the interval type</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
|
|
<tr><td class="paramname">intervalType</td><td>Interval type, how to ceil. F.e. when intervalType = QwtDate::Months, the result will be ceiled to the next beginning of a month </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Ceiled datetime </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abb91fb441a254337d5445ad4bab1a662"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abb91fb441a254337d5445ad4bab1a662">◆ </a></span>dateOfWeek0()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDate QwtDate::dateOfWeek0 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>year</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
|
|
<td class="paramname"><em>type</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Date of the first day of the first week for a year. </p>
|
|
<p>The first day of a week depends on the current locale ( QLocale::firstDayOfWeek() ).</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">year</td><td>Year </td></tr>
|
|
<tr><td class="paramname">type</td><td>Option how to identify the first week </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>First day of week 0</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>QLocale::firstDayOfWeek(), <a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1b350f22a57b44b529bc4de740dbe213"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1b350f22a57b44b529bc4de740dbe213">◆ </a></span>floor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDateTime QwtDate::floor </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDateTime & </td>
|
|
<td class="paramname"><em>dateTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> </td>
|
|
<td class="paramname"><em>intervalType</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Floor a datetime according the interval type</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
|
|
<tr><td class="paramname">intervalType</td><td>Interval type, how to ceil. F.e. when intervalType = QwtDate::Months, the result will be ceiled to the next beginning of a month </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Floored datetime </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af82ba26011550602f1adb61da53bd830"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af82ba26011550602f1adb61da53bd830">◆ </a></span>maxDate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDate QwtDate::maxDate </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Maximum for the supported date range</p>
|
|
<p>The range of valid dates depends on how QDate stores the Julian day internally.</p>
|
|
<ul>
|
|
<li>For Qt4 it is "Tue Jun 3 5874898"</li>
|
|
<li>For Qt5 it is "Tue Dec 31 2147483647"</li>
|
|
</ul>
|
|
<dl class="section return"><dt>Returns</dt><dd>maximum of the date range </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a9ab1845543957472c2c6529ad03ef98d">minDate()</a> </dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The maximum differs between Qt4 and Qt5 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9ab1845543957472c2c6529ad03ef98d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9ab1845543957472c2c6529ad03ef98d">◆ </a></span>minDate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDate QwtDate::minDate </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Minimum for the supported date range</p>
|
|
<p>The range of valid dates depends on how QDate stores the Julian day internally.</p>
|
|
<ul>
|
|
<li>For Qt4 it is "Tue Jan 2 -4713"</li>
|
|
<li>For Qt5 it is "Thu Jan 1 -2147483648"</li>
|
|
</ul>
|
|
<dl class="section return"><dt>Returns</dt><dd>minimum of the date range </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#af82ba26011550602f1adb61da53bd830">maxDate()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8039dc115458981fc1c7fc2c0aa8d053"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8039dc115458981fc1c7fc2c0aa8d053">◆ </a></span>toDateTime()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QDateTime QwtDate::toDateTime </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"><em>value</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">Qt::TimeSpec </td>
|
|
<td class="paramname"><em>timeSpec</em> = <code>Qt::UTC</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Translate from double to QDateTime</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">value</td><td>Number of milliseconds since the epoch, 1970-01-01T00:00:00 UTC </td></tr>
|
|
<tr><td class="paramname">timeSpec</td><td>Time specification </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Datetime value</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#afce10fd70f7a1ecac3f97776fb2dc46a">toDouble()</a>, QDateTime::setMSecsSinceEpoch() </dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The return datetime for Qt::OffsetFromUTC will be Qt::UTC </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afce10fd70f7a1ecac3f97776fb2dc46a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afce10fd70f7a1ecac3f97776fb2dc46a">◆ </a></span>toDouble()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double QwtDate::toDouble </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDateTime & </td>
|
|
<td class="paramname"><em>dateTime</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Translate from QDateTime to double</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Number of milliseconds since 1970-01-01T00:00:00 UTC has passed.</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a8039dc115458981fc1c7fc2c0aa8d053">toDateTime()</a>, QDateTime::toMSecsSinceEpoch() </dd></dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>For values very far below or above 1970-01-01 UTC rounding errors will happen due to the limited significance of a double. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2c19998281321ba078d717f7f9ec6855"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2c19998281321ba078d717f7f9ec6855">◆ </a></span>toString()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QString QwtDate::toString </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDateTime & </td>
|
|
<td class="paramname"><em>dateTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const QString & </td>
|
|
<td class="paramname"><em>format</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
|
|
<td class="paramname"><em>week0Type</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Translate a datetime into a string</p>
|
|
<p>Beside the format expressions documented in QDateTime::toString() the following expressions are supported:</p>
|
|
<ul>
|
|
<li>w<br />
|
|
week number: ( 1 - 53 )</li>
|
|
<li>ww<br />
|
|
week number with a leading zero ( 01 - 53 )</li>
|
|
</ul>
|
|
<p>As week 1 usually starts in the previous year a special rule is applied for formats, where the year is expected to match the week number - even if the date belongs to the previous year.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
|
|
<tr><td class="paramname">format</td><td>Format string </td></tr>
|
|
<tr><td class="paramname">week0Type</td><td>Specification of week 0</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Datetime string </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>QDateTime::toString(), <a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber()</a>, <a class="el" href="class_qwt_date_scale_draw.html" title="A class for drawing datetime scales.">QwtDateScaleDraw</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aeadce3496f631eae3a7e54749078c7a4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aeadce3496f631eae3a7e54749078c7a4">◆ </a></span>utcOffset()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int QwtDate::utcOffset </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDateTime & </td>
|
|
<td class="paramname"><em>dateTime</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Offset in seconds from Coordinated Universal Time</p>
|
|
<p>The offset depends on the time specification of dateTime:</p>
|
|
<ul>
|
|
<li>Qt::UTC 0, dateTime has no offset</li>
|
|
<li>Qt::OffsetFromUTC returns dateTime.utcOffset()</li>
|
|
<li>Qt::LocalTime: number of seconds from the UTC</li>
|
|
</ul>
|
|
<p>For Qt::LocalTime the offset depends on the timezone and daylight savings.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Offset in seconds </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a90dd1f9dc38565c003f8e1ef821965b7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a90dd1f9dc38565c003f8e1ef821965b7">◆ </a></span>weekNumber()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int QwtDate::weekNumber </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const QDate & </td>
|
|
<td class="paramname"><em>date</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
|
|
<td class="paramname"><em>type</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Find the week number of a date</p>
|
|
<ul>
|
|
<li><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d">QwtDate::FirstThursday</a><br />
|
|
Corresponding to ISO 8601 ( see QDate::weekNumber() ).</li>
|
|
<li><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6">QwtDate::FirstDay</a><br />
|
|
Number of weeks that have begun since <a class="el" href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662" title="Date of the first day of the first week for a year.">dateOfWeek0()</a>.</li>
|
|
</ul>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">date</td><td>Date </td></tr>
|
|
<tr><td class="paramname">type</td><td>Option how to identify the first week</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Week number, starting with 1 </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="class_qwt_date.html">QwtDate</a></li>
|
|
<li class="footer">Generated by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|