mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-06 22:00:52 +01:00
TerminalStripLayoutPattern is now shared
TerminalStripLayoutPattern class is now a shared pointer between all terminal strip item. QETProject have now a new class : ProjectPropertiesHandler the goal of this class is to manage every kind of properties used in the project, this class will be strongly used in future.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#define TERMINALSTRIPDRAWER_H
|
||||
|
||||
#include <QPointer>
|
||||
#include "terminalstriplayoutpattern.h"
|
||||
#include "properties/terminalstriplayoutpattern.h"
|
||||
|
||||
class QPainter;
|
||||
class TerminalStrip;
|
||||
@@ -27,19 +27,23 @@ class TerminalStrip;
|
||||
class TerminalStripDrawer
|
||||
{
|
||||
public:
|
||||
TerminalStripDrawer(QPointer<TerminalStrip> strip = QPointer<TerminalStrip>());
|
||||
TerminalStripDrawer(QPointer<TerminalStrip> strip = QPointer<TerminalStrip>(),
|
||||
QSharedPointer<TerminalStripLayoutPattern> layout = QSharedPointer<TerminalStripLayoutPattern>());
|
||||
|
||||
void setStrip(TerminalStrip *strip);
|
||||
void paint(QPainter *painter);
|
||||
QRectF boundingRect() const;
|
||||
|
||||
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
|
||||
bool haveLayout() const;
|
||||
|
||||
private:
|
||||
int height() const;
|
||||
int width() const;
|
||||
|
||||
private:
|
||||
QPointer<TerminalStrip> m_strip;
|
||||
TerminalStripLayoutPattern m_pattern;
|
||||
QSharedPointer<TerminalStripLayoutPattern> m_pattern;
|
||||
};
|
||||
|
||||
#endif // TERMINALSTRIPDRAWER_H
|
||||
|
||||
Reference in New Issue
Block a user