0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00
LimeReport/limereport/items/borderframeeditor.h

43 lines
922 B
C
Raw Normal View History

2022-06-13 21:18:57 +03:00
#ifndef WIDGET
#define WIDGET
#include <QWidget>
#include <QGraphicsScene>
#include <QGraphicsLineItem>
#include "lrbasedesignintf.h"
QT_BEGIN_NAMESPACE
namespace Ui { class BorderFrameEditor; }
QT_END_NAMESPACE
class BorderFrameEditor : public QWidget
{
Q_OBJECT
public:
BorderFrameEditor(QWidget *parent = nullptr);
~BorderFrameEditor();
void setPen(QPen pen);
QPen pen();
void setAllLines();
void unSetAllLines();
protected:
void mousePressEvent(QMouseEvent *event);
signals:
void borderSideClicked(int side,bool show);
private slots:
void SlotBorderSideClicked(int side, bool show);
private:
Ui::BorderFrameEditor *ui;
QGraphicsScene *scene;
QGraphicsLineItem *topLine = NULL
,*bottomLine = NULL
,*leftLine = NULL
,*rightLine = NULL;
QPen m_pen;
void updateBorders();
};
#endif // WIDGET