VTK  9.3.20240329
vtkQtTimePointUtility.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
12 #ifndef vtkQtTimePointUtility_h
13 #define vtkQtTimePointUtility_h
14 
15 #include "vtkGUISupportQtSQLModule.h" // For export macro
16 #include "vtkObject.h"
17 #include <QDateTime> // Needed for method return types
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class VTKGUISUPPORTQTSQL_EXPORT vtkQtTimePointUtility : public vtkObject
21 {
22 public:
24  void PrintSelf(ostream& os, vtkIndent indent) override;
25 
26  static QDateTime TimePointToQDateTime(vtkTypeUInt64 time);
27  static vtkTypeUInt64 QDateTimeToTimePoint(QDateTime time);
28  static vtkTypeUInt64 QDateToTimePoint(QDate date);
29  static vtkTypeUInt64 QTimeToTimePoint(QTime time);
30 
31 protected:
32  vtkQtTimePointUtility() = default;
33  ~vtkQtTimePointUtility() override = default;
34 
35 private:
37  void operator=(const vtkQtTimePointUtility&) = delete;
38 };
39 
40 VTK_ABI_NAMESPACE_END
41 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
performs common time operations
~vtkQtTimePointUtility() override=default
static vtkTypeUInt64 QDateTimeToTimePoint(QDateTime time)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQtTimePointUtility()=default
static QDateTime TimePointToQDateTime(vtkTypeUInt64 time)
static vtkTypeUInt64 QDateToTimePoint(QDate date)
static vtkTypeUInt64 QTimeToTimePoint(QTime time)
@ time
Definition: vtkX3D.h:497
@ date
Definition: vtkX3D.h:319