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

45 lines
1.0 KiB
C
Raw Permalink Normal View History

2022-06-13 21:18:57 +03:00
#ifndef WIDGET
#define WIDGET
#include "lrbasedesignintf.h"
2022-10-31 21:20:24 +03:00
#include <QGraphicsLineItem>
#include <QGraphicsScene>
#include <QWidget>
namespace LimeReport {
namespace Ui {
class BorderFrameEditor;
}
2022-06-13 21:18:57 +03:00
class BorderFrameEditor: public QWidget {
2022-06-13 21:18:57 +03:00
Q_OBJECT
public:
BorderFrameEditor(QWidget* parent = nullptr);
2022-06-13 21:18:57 +03:00
~BorderFrameEditor();
void setPen(QPen pen);
QPen pen();
void setAllLines();
void unSetAllLines();
2022-06-13 21:18:57 +03:00
protected:
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:
QGraphicsLineItem* createSideLine(LimeReport::BaseDesignIntf::BorderSide side);
2022-10-31 21:20:24 +03:00
void updateBorders();
2022-06-13 21:18:57 +03:00
private:
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