0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-23 16:22:58 +03:00
LimeReport/limereport/items/lrborderframeeditor.h
Андрей Лухнов 0fca7169d3 Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
2024-09-19 21:09:38 +03:00

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