- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
215 lines
5.3 KiB
C++
Executable File
215 lines
5.3 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
#include <QObject>
|
|
|
|
|
|
#include "ltswidgets_export.h"
|
|
#include "qcheckbox.h"
|
|
#include "qpushbutton.h"
|
|
|
|
#include <QWidget>
|
|
#include <functional>
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class LtsDateTimeEditLe;
|
|
class LtsDateTimeEdit;
|
|
}
|
|
|
|
class QLineEdit;
|
|
class QShortcut;
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
class LTSWIDGETS_EXPORT LtsDateTimeEdit : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(bool autoForward READ getAutoForward WRITE setAutoForward)
|
|
Q_PROPERTY(bool editTimezone READ getEditTimezone WRITE setEditTimezone)
|
|
Q_PROPERTY(bool withButtons READ getWithButtons WRITE setWithButtons)
|
|
Q_PROPERTY(bool withSlider READ getWithSlider WRITE setWithSlider)
|
|
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
|
|
Q_PROPERTY(bool withNowButton READ withNowButton WRITE setWithNowButton)
|
|
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
|
|
Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled)
|
|
|
|
public:
|
|
|
|
using CurrentTimeCallback = std::function<qint64()>;
|
|
|
|
explicit LtsDateTimeEdit(QWidget *parent = nullptr, bool withNowButton = true, bool checkable = false);
|
|
~LtsDateTimeEdit();
|
|
|
|
bool setupUiTouch();
|
|
|
|
|
|
qint64 msecsSinceEpoch() const;
|
|
bool isEmpty() const;
|
|
bool isValidDate() const;
|
|
|
|
void setAutoForward(const bool af) { m_autoForward = af; }
|
|
bool getAutoForward() const { return m_autoForward; }
|
|
|
|
void setEditTimezone(const bool edit);
|
|
bool getEditTimezone() const { return m_editTimezone; }
|
|
|
|
void setWithButtons(const bool buttons);
|
|
bool getWithButtons() const { return m_withButtons; }
|
|
|
|
void setWithSlider(const bool slider);
|
|
bool getWithSlider() const { return m_withSlider; }
|
|
|
|
void setReadOnly(const bool readOnly);
|
|
bool isReadOnly() const { return m_readOnly; }
|
|
|
|
void setCheckable(bool checkable);
|
|
bool isCheckable() const { return m_checkable; }
|
|
void setChecked(bool bChecked);
|
|
bool isChecked() const;
|
|
|
|
void setWithNowButton(bool nowButton);
|
|
bool withNowButton() const { return m_withNowButton; }
|
|
|
|
|
|
void setMinimumTimeMSec(qint64 msec);
|
|
qint64 minimumTimeMSec() const { return m_minTimeMSec; }
|
|
|
|
|
|
void setMaximumTimeMSec(qint64 msec);
|
|
qint64 maximumTimeMSec() const { return m_maxTimeMSec; }
|
|
|
|
void setMinMaxTimeMSec(qint64 min, qint64 max) { setMinimumTimeMSec(min); setMaximumTimeMSec(max); }
|
|
|
|
void setRetrieveCurrentTimeCallback(const CurrentTimeCallback &cb);
|
|
|
|
bool setTimezone(char tz);
|
|
char getTimezone() const;
|
|
qint64 getTimezoneAsSecs() const;
|
|
|
|
void setSubWidgetsProperties(const QString &name, const QVariant &value);
|
|
|
|
Q_SIGNALS:
|
|
void dateTimeChanged();
|
|
void toggled(bool on);
|
|
|
|
public Q_SLOTS:
|
|
bool setMsecsSinceEpoch(qint64 msec, bool setToNearestPossible = true);
|
|
void clear();
|
|
|
|
private:
|
|
void clearTimezone();
|
|
|
|
void setMinMaxMonth(int minMonth, int maxMonth);
|
|
|
|
bool setMonth(int month);
|
|
int getMonth() const;
|
|
|
|
bool setDay(int day);
|
|
int getDay() const;
|
|
|
|
bool setHHMMSS(int hour, int minute, int second);
|
|
int getHour() const;
|
|
int getMinute() const;
|
|
int getSecond() const;
|
|
|
|
bool setYear(int year);
|
|
int getYear() const;
|
|
|
|
bool isEmptyDay() const;
|
|
bool isEmptyHHMMSS() const;
|
|
bool isEmptyTimezone() const;
|
|
bool isEmptyMonth() const;
|
|
bool isEmptyYear() const;
|
|
|
|
bool hasFocus() const;
|
|
|
|
bool isDataAcceptable();
|
|
|
|
void showInvalidData(bool setFocus);
|
|
|
|
bool isLineEditDataAcceptable(QLineEdit *le) const;
|
|
|
|
bool isDayAcceptable() const;
|
|
bool isHHMMSSAcceptable() const;
|
|
bool isMonthAcceptable() const;
|
|
bool isYearAcceptable() const;
|
|
bool isTzAcceptable() const;
|
|
|
|
QCheckBox* checkBox() const;
|
|
QPushButton* pbNow() const;
|
|
|
|
private Q_SLOTS:
|
|
void setFixedDateTime();
|
|
void setOffsetDateTime();
|
|
|
|
void setSliderValue(int val);
|
|
void valueDayChanged(const QString &str);
|
|
void fixupHHMMSS();
|
|
void valueMonthChanged(const QString &str);
|
|
void valueMonthChanged2(const QString &str);
|
|
void valueTimezoneChangedStr(const QString &str);
|
|
void valueTimezoneChangedInt(int newTimezone);
|
|
void valueYearChanged(const QString &str);
|
|
|
|
void onBackHourClicked();
|
|
void onBackMinuteClicked();
|
|
void onBackSecondClicked();
|
|
void onForwardSecondClicked();
|
|
void onForwardMinuteClicked();
|
|
void onForwardHourClicked();
|
|
|
|
void onCheckBoxChanged();
|
|
void disableControls();
|
|
void enableControls();
|
|
void enaDisaControls(bool bEnable);
|
|
|
|
void onFocusOutHHMMSS();
|
|
void onFocusOutTZ();
|
|
void onFocusOutDay();
|
|
void onFocusOutMonth();
|
|
void onFocusOutYear();
|
|
|
|
void onFocusOutBackspace();
|
|
void onFocusOut();
|
|
|
|
void onHmsWheelEvent(bool bForward, int cursorPos);
|
|
void onDayWheelEvent(bool bForward, int cursorPos);
|
|
void onMonthWheelEvent(bool bForward, int cursorPos);
|
|
void onYearWheelEvent(bool bForward, int cursorPos);
|
|
|
|
private:
|
|
Ui::LtsDateTimeEditLe *m_uiLe{nullptr};
|
|
Ui::LtsDateTimeEdit *m_uiTouch{nullptr};
|
|
QShortcut *m_scFixed = nullptr;
|
|
QShortcut *m_scOffset = nullptr;
|
|
|
|
CurrentTimeCallback m_getCurrentTimeCallback = nullptr;
|
|
|
|
qint64 m_minTimeMSec = 0;
|
|
qint64 m_maxTimeMSec = 0;
|
|
|
|
qint64 m_curTimeMSec = -1;
|
|
|
|
bool m_editTimezone = true;
|
|
bool m_autoForward = true;
|
|
bool m_withButtons = false;
|
|
bool m_withSlider = false;
|
|
bool m_readOnly = false;
|
|
bool m_checkable = false;
|
|
bool m_withNowButton = false;
|
|
|
|
int m_minMonth{0};
|
|
int m_maxMonth{0};
|
|
|
|
|
|
bool m_backspacePressed = false;
|
|
bool m_recursionAvoid = false;
|
|
bool m_dateIsAcceptable = false;
|
|
};
|
|
|
|
}
|