2022-06-13 21:18:57 +03:00
|
|
|
#ifndef WIDGET
|
|
|
|
#define WIDGET
|
|
|
|
|
|
|
|
#include "lrbasedesignintf.h"
|
2022-10-31 21:20:24 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
#include <QGraphicsLineItem>
|
|
|
|
#include <QGraphicsScene>
|
|
|
|
#include <QWidget>
|
|
|
|
namespace LimeReport {
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class BorderFrameEditor;
|
|
|
|
}
|
2022-06-13 21:18:57 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class BorderFrameEditor: public QWidget {
|
2022-06-13 21:18:57 +03:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2024-09-04 17:31:16 +03:00
|
|
|
BorderFrameEditor(QWidget* parent = nullptr);
|
2022-06-13 21:18:57 +03:00
|
|
|
~BorderFrameEditor();
|
|
|
|
void setPen(QPen pen);
|
|
|
|
QPen pen();
|
|
|
|
void setAllLines();
|
|
|
|
void unSetAllLines();
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2022-06-13 21:18:57 +03:00
|
|
|
protected:
|
2024-09-04 17:31:16 +03:00
|
|
|
void mousePressEvent(QMouseEvent* event);
|
2022-06-13 21:18:57 +03:00
|
|
|
signals:
|
2022-10-31 21:20:24 +03:00
|
|
|
void borderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
|
2022-06-13 21:18:57 +03:00
|
|
|
private slots:
|
2022-10-31 21:20:24 +03:00
|
|
|
void slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
|
2022-06-13 21:18:57 +03:00
|
|
|
|
2022-10-31 21:20:24 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
QGraphicsLineItem* createSideLine(LimeReport::BaseDesignIntf::BorderSide side);
|
2022-10-31 21:20:24 +03:00
|
|
|
void updateBorders();
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2022-06-13 21:18:57 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
Ui::BorderFrameEditor* ui;
|
|
|
|
QGraphicsScene* scene;
|
|
|
|
QGraphicsLineItem *topLine = NULL, *bottomLine = NULL, *leftLine = NULL, *rightLine = NULL;
|
2022-10-31 21:20:24 +03:00
|
|
|
QPen m_pen;
|
2022-06-13 21:18:57 +03:00
|
|
|
};
|
2022-10-31 21:20:24 +03:00
|
|
|
} // namespace LimeReport
|
2022-06-13 21:18:57 +03:00
|
|
|
#endif // WIDGET
|