mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-23 16:22:58 +03:00
0fca7169d3
except those placed in 3rdparty directories.
45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#ifndef WIDGET
|
|
#define WIDGET
|
|
|
|
#include "lrbasedesignintf.h"
|
|
|
|
#include <QGraphicsLineItem>
|
|
#include <QGraphicsScene>
|
|
#include <QWidget>
|
|
namespace LimeReport {
|
|
|
|
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:
|
|
void borderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
|
|
private slots:
|
|
void slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
|
|
|
|
private:
|
|
QGraphicsLineItem* createSideLine(LimeReport::BaseDesignIntf::BorderSide side);
|
|
void updateBorders();
|
|
|
|
private:
|
|
Ui::BorderFrameEditor* ui;
|
|
QGraphicsScene* scene;
|
|
QGraphicsLineItem *topLine = NULL, *bottomLine = NULL, *leftLine = NULL, *rightLine = NULL;
|
|
QPen m_pen;
|
|
};
|
|
} // namespace LimeReport
|
|
#endif // WIDGET
|