Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
Executable
+94
@@ -0,0 +1,94 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lts_widgets_export.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QPixmap>
|
||||
#include <QPointer>
|
||||
#include <QWidget>
|
||||
#include <QUrl>
|
||||
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
class LTSWIDGETS_EXPORT LtsLinkEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
explicit LtsLinkEvent(QUrl url, QWidget *sourceBaseLayoutWidget)
|
||||
: QEvent(eventTypeId())
|
||||
, m_url(std::move(url))
|
||||
, m_sourceBaseLayoutWidget(sourceBaseLayoutWidget)
|
||||
{}
|
||||
|
||||
static QEvent::Type eventTypeId();
|
||||
QWidget *sourceBaseLayoutWidget() const { return m_sourceBaseLayoutWidget.data(); }
|
||||
QUrl url() const { return m_url; }
|
||||
private:
|
||||
QUrl m_url;
|
||||
QPointer<QWidget> m_sourceBaseLayoutWidget;
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT SaveImageEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
SaveImageEvent(QWidget *w, QPixmap &&pm)
|
||||
: QEvent(saveImageEventId()), m_widget(w), m_pix(std::move(pm))
|
||||
{}
|
||||
|
||||
const QPixmap &pixmap() const { return m_pix; }
|
||||
QWidget *widget() const { return m_widget.data(); }
|
||||
static QEvent::Type saveImageEventId();
|
||||
private:
|
||||
QPointer<QWidget> m_widget;
|
||||
QPixmap m_pix;
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT AddMarkerEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
AddMarkerEvent()
|
||||
: QEvent(addMarkerEventId())
|
||||
{}
|
||||
static QEvent::Type addMarkerEventId();
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT SetMarkerEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
SetMarkerEvent(const QString &description)
|
||||
: QEvent(setMarkerEventId()), m_description(description)
|
||||
{}
|
||||
const QString &getDescription() const { return m_description; }
|
||||
void setDescription(const QString &description) { m_description = description; }
|
||||
static QEvent::Type setMarkerEventId();
|
||||
private:
|
||||
QString m_description;
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT AddSnapshotEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
AddSnapshotEvent()
|
||||
: QEvent(addSnapshotEventId())
|
||||
{}
|
||||
static QEvent::Type addSnapshotEventId();
|
||||
};
|
||||
|
||||
class LTSWIDGETS_EXPORT SaveSnapshotEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
SaveSnapshotEvent(const QString &description)
|
||||
: QEvent(saveSnapshotEventId()), m_description(description)
|
||||
{}
|
||||
const QString &getDescription() const { return m_description; }
|
||||
void setDescription(const QString &description) { m_description = description; }
|
||||
static QEvent::Type saveSnapshotEventId();
|
||||
private:
|
||||
QString m_description;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user