Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
Executable
+66
@@ -0,0 +1,66 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AudioVideoManagement/ava_types.h>
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
|
||||
|
||||
class IntervalModel : public LtsWidgets::LtsAbstractTableModel<AvaTimelinePart>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Columns
|
||||
{
|
||||
Start = 0,
|
||||
End,
|
||||
Duration,
|
||||
};
|
||||
|
||||
IntervalModel();
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
void reset();
|
||||
|
||||
bool isEmpty() const { return m_vecData.isEmpty(); }
|
||||
|
||||
void setCurrentPosition(AvaTimePoint pos, bool forceSignal = false);
|
||||
boost::optional<AvaTimePoint> currentPosition() const { return m_currentPos; }
|
||||
|
||||
|
||||
|
||||
const AvaTimelinePart &previousInterval() const;
|
||||
const AvaTimelinePart &nextInterval() const;
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
void currentIntervalChanged(bool hasPreviousInterval, bool hasNextInterval, const QModelIndex &rowIndex);
|
||||
|
||||
public slots:
|
||||
void setTimezoneHoursOffset(int timezoneHoursOffset);
|
||||
|
||||
private:
|
||||
QString dateTimeToStringy(const QDateTime &dt) const;
|
||||
QString msecsSinceEpochToStringy(qint64 msecs) const;
|
||||
|
||||
|
||||
|
||||
using HalfIndex = int;
|
||||
HalfIndex intervalForPos(AvaTimePoint pos) const;
|
||||
|
||||
boost::optional<AvaTimePoint> m_currentPos;
|
||||
boost::optional<HalfIndex> m_currentInterval;
|
||||
|
||||
int m_timezoneHoursOffset = 0;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user