Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsWidgets/lts_picture_view.h
T
berrux-dev 855b0a6101 Remove modules not compiled by this branch's release build
Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD
branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan,
LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor,
LtsPluginManager, LtsPrinting, LtsProjectionWorkstation,
LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic,
LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13
subdirectories actually built remain.

TrainingAreaBase: drop sources of targets excluded by
IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer,
svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7
plugin directories not added in the release path (AdlerJson,
ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only
tabTelegrams, svcTabCommon and the TetraJson plugin are compiled.

Cross-checked: no kept compiled source includes headers from the
removed modules (GuiPluginInterface - the only LtsWidgets consumer -
is itself NOT RELEASE_BUILD-guarded).
2026-10-13 19:19:55 +02:00

67 lines
1.4 KiB
C++

/**
* @RDE_HEADER@
* Crop pictures
* $Id$
* $HeadURL$
* $Author$
* Created by Raphael Becker
*/
#pragma once
#include "lts_widgets_export.h"
#include <QtWidgets/QGraphicsView>
class QRubberBand;
namespace LtsWidgets
{
class LTSWIDGETS_EXPORT LtsPictureView : public QGraphicsView
{
Q_OBJECT
public:
explicit LtsPictureView(QWidget *parent = nullptr);
~LtsPictureView();
void hideRubberband();
void newRubberBand();
void cutPicture();
QGraphicsPixmapItem *getImage();
protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
private:
bool m_mouseActive;
bool m_moveable;
bool m_aspectRatioEnabled;
bool m_s_inEdit;
double m_aspectRatio;
QRect m_curRectangle;
QGraphicsScene *m_gsPicture;
QRubberBand *m_rubberband;
QGraphicsPixmapItem *m_image;
QGraphicsPixmapItem *m_origimage;
QPoint m_origin;
QPoint m_bandoffset;
public slots:
void setPicture(const QImage &image, const QPoint &pos, const bool flag);
void setAspectRatio(double aspectRatio);
void ratioClicked(bool enabled);
void leftChanged(int left);
void rightChanged(int right);
void topChanged(int top);
void bottomChanged(int bottom);
signals:
void mouseMoved(const QRect &);
void setLimits(const QSize &, bool);
};
}