0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-26 01:24:39 +03:00
LimeReport/limereport/items/lrborderframeeditor.h

47 lines
1.1 KiB
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"
2022-10-31 21:20:24 +03:00
namespace LimeReport{
2022-06-13 21:18:57 +03:00
namespace Ui { class BorderFrameEditor; }
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:
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:
QGraphicsLineItem *createSideLine(LimeReport::BaseDesignIntf::BorderSide side);
void updateBorders();
2022-06-13 21:18:57 +03:00
private:
Ui::BorderFrameEditor *ui;
2022-10-31 21:20:24 +03:00
QGraphicsScene *scene;
QGraphicsLineItem *topLine = NULL
2022-06-13 21:18:57 +03:00
,*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