QElectroTech  0.70
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DiagramFolioList Class Reference

#include <diagramfoliolist.h>

Public Member Functions

 DiagramFolioList (QETProject *project)
 DiagramFolioList::DiagramFolioList Constructor. More...
 
 ~DiagramFolioList () override
 DiagramFolioList::~DiagramFolioList Destructor. More...
 
virtual QList< QLineF * > lines () const
 
virtual QList< QRectF * > rectangles () const
 
void setId (int i)
 
int getId () const
 
- Public Member Functions inherited from Diagram
 Diagram (QETProject *project)
 Diagram::Diagram Constructor. More...
 
 ~Diagram () override
 Diagram::~Diagram Destructor. More...
 
void setEventInterface (DiagramEventInterface *event_interface)
 Diagram::setEventInterface Set event_interface has current interface. Diagram become the ownership of event_interface If there is a previous interface, they will be delete before and call init() to the new interface. More...
 
void clearEventInterface ()
 Diagram::clearEventInterface Clear the current event interface. More...
 
QString conductorsAutonumName () const
 Diagram::conductorsAutonumName. More...
 
void setConductorsAutonumName (const QString &name)
 Diagram::setConductorsAutonumName. More...
 
QETProjectproject () const
 
void setProject (QETProject *)
 Diagram::setProject Set parent project of this diagram, project also become the parent QObject of this diagram. More...
 
int folioIndex () const
 
qreal declaredQElectroTechVersion (bool=true) const
 
void showMe ()
 
bool isReadOnly () const
 Diagram::isReadOnly. More...
 
void setConductor (bool)
 
void setConductorStart (QPointF)
 
void setConductorStop (QPointF)
 
QList< QSet< Conductor * > > potentials ()
 Diagram::potential. More...
 
QDomDocument toXml (bool=true)
 
bool initFromXml (QDomElement &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
 
bool fromXml (QDomDocument &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
 
bool fromXml (QDomElement &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
 
void folioSequentialsToXml (QHash< QString, QStringList > *, QDomElement *, const QString &, const QString &, QDomDocument *)
 Diagram::folioSequentialsToXml. More...
 
void folioSequentialsFromXml (const QDomElement &, QHash< QString, QStringList > *, const QString &, const QString &, const QString &, const QString &)
 Diagram::folioSequentialsFromXml Load folio sequential from QDomElement. More...
 
void refreshContents ()
 Diagram::refreshContents refresh all content of diagram. More...
 
virtual void addItem (QGraphicsItem *item)
 Diagram::addItem Réimplemented from QGraphicsScene::addItem(QGraphicsItem *item) Do some specific operation if item need it (for exemple an element) More...
 
virtual void removeItem (QGraphicsItem *item)
 Diagram::removeItem Réimplemented from QGraphicsScene::removeItem(QGraphicsItem *item) Do some specific operation if item need it (for exemple an element) More...
 
ExportProperties applyProperties (const ExportProperties &)
 
void setDisplayGrid (bool)
 
bool displayGrid ()
 
void setUseBorder (bool)
 
bool useBorder ()
 
void setBorderOptions (BorderOptions)
 
BorderOptions borderOptions ()
 
DiagramPosition convertPosition (const QPointF &)
 
bool drawTerminals () const
 
void setDrawTerminals (bool)
 
bool drawColoredConductors () const
 
void setDrawColoredConductors (bool)
 
QString title () const
 
bool toPaintDevice (QPaintDevice &, int=-1, int=-1, Qt::AspectRatioMode=Qt::KeepAspectRatio)
 
QSize imageSize () const
 
bool isEmpty () const
 
QList< Element * > elements () const
 
QList< Conductor * > conductors () const
 Diagram::conductors Return the list containing all conductors. More...
 
QSet< Conductor * > selectedConductors () const
 
DiagramContent content () const
 
bool canRotateSelection () const
 Diagram::canRotateSelection. More...
 
ElementsMoverelementsMover ()
 
ElementTextsMoverelementTextsMover ()
 
bool usesElement (const ElementsLocation &)
 
bool usesTitleBlockTemplate (const QString &)
 
QUndoStack & undoStack ()
 
QGIManagerqgiManager ()
 
void freezeElements (bool freeze)
 Diagram::freezeElements Freeze every existent element label. More...
 
void unfreezeElements ()
 Diagram::unfreezeElements Unfreeze every existent element label. More...
 
void setFreezeNewElements (bool)
 Diagram::freezeNewElements Set new element label to be frozen. More...
 
bool freezeNewElements ()
 Diagram::freezeNewElements. More...
 
void freezeConductors (bool freeze)
 Diagram::freezeConductors Freeze every existent conductor label. More...
 
void setFreezeNewConductors (bool)
 Diagram::setfreezeNewConductors Set new conductor label to be frozen. More...
 
bool freezeNewConductors ()
 Diagram::freezeNewConductors. More...
 
void insertFolioSeqHash (QHash< QString, QStringList > *hash, const QString &title, const QString &seq, NumerotationContext *nc)
 Diagram::insertFolioSeqHash This class inserts a stringlist containing all sequential variables related to an autonum in a QHash. More...
 
void loadFolioSeqHash (QHash< QString, QStringList > *hash, const QString &title, const QString &seq, NumerotationContext *nc)
 Diagram::loadFolioSeqHash This class loads all folio sequential variables related to the current autonum. More...
 
void changeZValue (QET::DepthOption option)
 Diagram::changeZValue Change the Z value of the current selected item, according to . More...
 

Static Public Attributes

static qreal colWidths [7] = {0.05, 0.50, 0.10, 0.10, 0.05, 0.10, 0.10}
 
- Static Public Attributes inherited from Diagram
static int xGrid = 10
 abscissa grid step size More...
 
static int yGrid = 10
 ordinate grid step size More...
 
static int xKeyGrid = 10
 Key grid x step size. More...
 
static int yKeyGrid = 10
 Key grid y step size. More...
 
static int xKeyGridFine = 1
 Key grid fine x step size. More...
 
static int yKeyGridFine = 1
 Key grid fine y step size. More...
 
static const qreal margin = 5.0
 margin around the diagram More...
 
static QColor background_color = Qt::white
 background color of diagram More...
 

Protected Member Functions

void drawBackground (QPainter *, const QRectF &) override
 DiagramFolioList::drawBackground Draw background, and call method to draw the folio list (grid) More...
 
- Protected Member Functions inherited from Diagram
void drawBackground (QPainter *, const QRectF &) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 Diagram::mouseDoubleClickEvent This event is managed by diagram event interface if any. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 Diagram::mousePressEvent This event is managed by diagram event interface if any. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 Diagram::mouseMoveEvent This event is managed by diagram event interface if any. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 Diagram::mouseReleaseEvent This event is managed by diagram event interface if any. More...
 
void wheelEvent (QGraphicsSceneWheelEvent *event) override
 Diagram::wheelEvent This event is managed by diagram event interface if any. More...
 
void keyPressEvent (QKeyEvent *event) override
 Diagram::keyPressEvent This event is managed by diagram event interface if any. Else move selected elements. More...
 
void keyReleaseEvent (QKeyEvent *) override
 Diagram::keyReleaseEvent This event is managed by diagram event interface if any. Else move selected element. More...
 

Private Member Functions

void fillRow (QPainter *, const QRectF &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &)
 DiagramFolioList::fillRow Add new row and fill it with the given information. More...
 
void buildGrid (QPainter *, const QRectF &, int, int, qreal[])
 
void fillHeader (QPainter *, const QRectF &)
 DiagramFolioList::fillHeader Fill the header with bigger font. More...
 

Private Attributes

QList< QLineF * > list_lines_
 
QList< QRectF * > list_rectangles_
 
QRectF sheetRectangle
 
int id
 

Additional Inherited Members

- Public Types inherited from Diagram
enum  BorderOptions { EmptyBorder, TitleBlock, Columns }
 
enum  NumerotationType { Conductors }
 Represents available option of Numerotation type. More...
 
- Public Slots inherited from Diagram
void adjustSceneRect ()
 Diagram::adjustSceneRect Recalcul and adjust the size of the scene. More...
 
void titleChanged (const QString &)
 
void titleBlockTemplateChanged (const QString &)
 
void titleBlockTemplateRemoved (const QString &, const QString &=QString())
 
void setTitleBlockTemplate (const QString &)
 
void updateLabels ()
 Diagram::updateLabels Update elements and conductors that reference folio field in their labels. More...
 
void loadElmtFolioSeq ()
 Diagram::loadElmtFolioSeq This class loads all folio sequential variables related to the current autonum. More...
 
void loadCndFolioSeq ()
 Diagram::loadCndFolioSeq This class loads all conductor folio sequential variables related to the current autonum. More...
 
void selectAll ()
 
void deselectAll ()
 
void invertSelection ()
 
- Signals inherited from Diagram
void showDiagram (Diagram *)
 
void usedTitleBlockTemplateChanged (const QString &)
 
void diagramTitleChanged (Diagram *, const QString &)
 
void findElementRequired (const ElementsLocation &)
 
void editElementRequired (const ElementsLocation &)
 Signal emitted when users wish to locate an element from the diagram within elements collection. More...
 
void diagramActivated ()
 Signal emitted when users wish to edit an element from the diagram. More...
 
- Static Public Member Functions inherited from Diagram
static bool clipboardMayContainDiagram ()
 
static QPointF snapToGrid (const QPointF &p)
 Diagram::snapToGrid Return a nearest snap point of p. More...
 
- Public Attributes inherited from Diagram
ConductorProperties defaultConductorProperties
 Default properties for new conductors. More...
 
BorderTitleBlock border_and_titleblock
 Diagram dimensions and title block. More...
 
QHash< QString, QStringList > m_elmt_unitfolio_max
 Hash containing max values for folio sequential autonums in this diagram. More...
 
QHash< QString, QStringList > m_elmt_tenfolio_max
 
QHash< QString, QStringList > m_elmt_hundredfolio_max
 
QHash< QString, QStringList > m_cnd_unitfolio_max
 Hash containing max values for folio sequential autonums in this diagram. More...
 
QHash< QString, QStringList > m_cnd_tenfolio_max
 
QHash< QString, QStringList > m_cnd_hundredfolio_max
 

Detailed Description

Definition at line 24 of file diagramfoliolist.h.

Constructor & Destructor Documentation

◆ DiagramFolioList()

DiagramFolioList::DiagramFolioList ( QETProject project)

DiagramFolioList::DiagramFolioList Constructor.

Parameters
project: The project of this diagram and also parent QObject

Definition at line 29 of file diagramfoliolist.cpp.

References Diagram::project().

◆ ~DiagramFolioList()

DiagramFolioList::~DiagramFolioList ( )
override

Member Function Documentation

◆ buildGrid()

void DiagramFolioList::buildGrid ( QPainter *  qp,
const QRectF &  rect,
int  rows,
int  tables,
qreal  colWidths[] 
)
private

Definition at line 215 of file diagramfoliolist.cpp.

References colWidths, list_lines_, and list_rectangles_.

Referenced by drawBackground().

◆ drawBackground()

void DiagramFolioList::drawBackground ( QPainter *  p,
const QRectF &  r 
)
overrideprotected

◆ fillHeader()

void DiagramFolioList::fillHeader ( QPainter *  qp,
const QRectF &  row_RectF 
)
private

DiagramFolioList::fillHeader Fill the header with bigger font.

Parameters
qpthe painter to use
row_RectFrectangle of header

Definition at line 263 of file diagramfoliolist.cpp.

References QETApp::diagramTextsFont(), fillRow(), and QET::Icons::tr.

Referenced by drawBackground().

◆ fillRow()

void DiagramFolioList::fillRow ( QPainter *  qp,
const QRectF &  row_rect,
const QString &  author,
const QString &  title,
const QString &  folio,
const QString &  plant,
const QString &  loc,
const QString &  indexrev,
const QString &  date 
)
private

DiagramFolioList::fillRow Add new row and fill it with the given information.

Parameters
qpQpainter to use
row_rectrectangle where we must draw the new row

Definition at line 122 of file diagramfoliolist.cpp.

References colWidths, QETApp::foliolistTextsFont(), Diagram::title(), and QET::Icons::tr.

Referenced by drawBackground(), and fillHeader().

◆ getId()

int DiagramFolioList::getId ( ) const
inline

Definition at line 32 of file diagramfoliolist.h.

References id.

◆ lines()

virtual QList<QLineF *> DiagramFolioList::lines ( ) const
inlinevirtual

Definition at line 29 of file diagramfoliolist.h.

References list_lines_.

◆ rectangles()

virtual QList<QRectF *> DiagramFolioList::rectangles ( ) const
inlinevirtual

Definition at line 30 of file diagramfoliolist.h.

References list_rectangles_.

◆ setId()

void DiagramFolioList::setId ( int  i)
inline

Definition at line 31 of file diagramfoliolist.h.

Member Data Documentation

◆ colWidths

qreal DiagramFolioList::colWidths = {0.05, 0.50, 0.10, 0.10, 0.05, 0.10, 0.10}
static

Definition at line 34 of file diagramfoliolist.h.

Referenced by buildGrid(), drawBackground(), fillRow(), and ExportDialog::fillRow().

◆ id

int DiagramFolioList::id
private

Definition at line 48 of file diagramfoliolist.h.

Referenced by getId().

◆ list_lines_

QList<QLineF *> DiagramFolioList::list_lines_
private

Definition at line 45 of file diagramfoliolist.h.

Referenced by buildGrid(), lines(), and ~DiagramFolioList().

◆ list_rectangles_

QList<QRectF *> DiagramFolioList::list_rectangles_
private

Definition at line 46 of file diagramfoliolist.h.

Referenced by buildGrid(), drawBackground(), rectangles(), and ~DiagramFolioList().

◆ sheetRectangle

QRectF DiagramFolioList::sheetRectangle
private

Definition at line 47 of file diagramfoliolist.h.


The documentation for this class was generated from the following files: