mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Improve last commit
Remove setter function : void BorderTitleBlock::setTitle(const QString &title) Remove singal diagramTitleChanged from BorderTitleBlock and use instead the signal informationChanged.
This commit is contained in:
@@ -322,8 +322,8 @@ void BorderTitleBlock::importTitleBlock(const TitleBlockProperties &ip)
|
|||||||
btb_version_ = QetVersion::displayedVersion();
|
btb_version_ = QetVersion::displayedVersion();
|
||||||
btb_auto_page_num_ = ip.auto_page_num;
|
btb_auto_page_num_ = ip.auto_page_num;
|
||||||
additional_fields_ = ip.context;
|
additional_fields_ = ip.context;
|
||||||
|
btb_title_ = ip.title;
|
||||||
|
|
||||||
setTitle(ip.title);
|
|
||||||
setFolio(ip.folio);
|
setFolio(ip.folio);
|
||||||
|
|
||||||
if (m_edge != ip.display_at)
|
if (m_edge != ip.display_at)
|
||||||
@@ -886,19 +886,6 @@ DiagramPosition BorderTitleBlock::convertPosition(const QPointF &pos)
|
|||||||
return(DiagramPosition(letter, row_number));
|
return(DiagramPosition(letter, row_number));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@brief BorderTitleBlock::setTitle
|
|
||||||
@param title the new value of the "Title" field
|
|
||||||
*/
|
|
||||||
void BorderTitleBlock::setTitle(const QString &title)
|
|
||||||
{
|
|
||||||
if (btb_title_ != title)
|
|
||||||
{
|
|
||||||
btb_title_ = title;
|
|
||||||
emit(diagramTitleChanged(title));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief BorderTitleBlock::setFolio
|
@brief BorderTitleBlock::setFolio
|
||||||
@param folio the new value of the "Folio" field
|
@param folio the new value of the "Folio" field
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ class BorderTitleBlock : public QObject
|
|||||||
DiagramPosition convertPosition(const QPointF &);
|
DiagramPosition convertPosition(const QPointF &);
|
||||||
|
|
||||||
// methods to set title block basic data
|
// methods to set title block basic data
|
||||||
void setTitle(const QString &title);
|
|
||||||
void setFolio(const QString &folio);
|
void setFolio(const QString &folio);
|
||||||
void setFolioData(int, int, const QString& = nullptr,
|
void setFolioData(int, int, const QString& = nullptr,
|
||||||
const DiagramContext & = DiagramContext());
|
const DiagramContext & = DiagramContext());
|
||||||
@@ -212,11 +211,6 @@ class BorderTitleBlock : public QObject
|
|||||||
Signal emitted after display options have changed
|
Signal emitted after display options have changed
|
||||||
*/
|
*/
|
||||||
void displayChanged();
|
void displayChanged();
|
||||||
/**
|
|
||||||
@brief diagramTitleChanged
|
|
||||||
Signal emitted after the title has changed
|
|
||||||
*/
|
|
||||||
void diagramTitleChanged(const QString &);
|
|
||||||
/**
|
/**
|
||||||
@brief titleBlockFolioChanged
|
@brief titleBlockFolioChanged
|
||||||
Signal emitted after Folio has changed
|
Signal emitted after Folio has changed
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ Diagram::Diagram(QETProject *project) :
|
|||||||
&BorderTitleBlock::needTitleBlockTemplate,
|
&BorderTitleBlock::needTitleBlockTemplate,
|
||||||
this, &Diagram::setTitleBlockTemplate);
|
this, &Diagram::setTitleBlockTemplate);
|
||||||
connect(&border_and_titleblock,
|
connect(&border_and_titleblock,
|
||||||
&BorderTitleBlock::diagramTitleChanged,
|
&BorderTitleBlock::informationChanged,
|
||||||
this, &Diagram::titleChanged);
|
this, &Diagram::titleChanged);
|
||||||
connect(&border_and_titleblock,
|
connect(&border_and_titleblock,
|
||||||
&BorderTitleBlock::titleBlockFolioChanged,
|
&BorderTitleBlock::titleBlockFolioChanged,
|
||||||
@@ -1644,8 +1644,8 @@ void Diagram::removeItem(QGraphicsItem *item)
|
|||||||
emit(diagramTitleChanged(this, title));
|
emit(diagramTitleChanged(this, title));
|
||||||
@param title
|
@param title
|
||||||
*/
|
*/
|
||||||
void Diagram::titleChanged(const QString &title) {
|
void Diagram::titleChanged() {
|
||||||
emit(diagramTitleChanged(this, title));
|
emit(diagramTitleChanged(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ class Diagram : public QGraphicsScene
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void adjustSceneRect ();
|
void adjustSceneRect ();
|
||||||
void titleChanged(const QString &);
|
void titleChanged();
|
||||||
void titleBlockTemplateChanged(const QString &);
|
void titleBlockTemplateChanged(const QString &);
|
||||||
void titleBlockTemplateRemoved(const QString &,
|
void titleBlockTemplateRemoved(const QString &,
|
||||||
const QString & = QString());
|
const QString & = QString());
|
||||||
@@ -275,7 +275,7 @@ class Diagram : public QGraphicsScene
|
|||||||
signals:
|
signals:
|
||||||
void showDiagram (Diagram *);
|
void showDiagram (Diagram *);
|
||||||
void usedTitleBlockTemplateChanged(const QString &);
|
void usedTitleBlockTemplateChanged(const QString &);
|
||||||
void diagramTitleChanged(Diagram *, const QString &);
|
void diagramTitleChanged(Diagram *);
|
||||||
|
|
||||||
/// Signal emitted when users wish to locate an element
|
/// Signal emitted when users wish to locate an element
|
||||||
/// from the diagram within elements collection
|
/// from the diagram within elements collection
|
||||||
|
|||||||
@@ -791,10 +791,8 @@ void GenericPanel::projectDiagramsOrderChanged(QETProject *project,
|
|||||||
@brief GenericPanel::diagramTitleChanged
|
@brief GenericPanel::diagramTitleChanged
|
||||||
Inform this panel the diagram \a diagram has changed its title to \a title.
|
Inform this panel the diagram \a diagram has changed its title to \a title.
|
||||||
@param diagram
|
@param diagram
|
||||||
@param title (unused)
|
|
||||||
*/
|
*/
|
||||||
void GenericPanel::diagramTitleChanged(Diagram *diagram, const QString &title) {
|
void GenericPanel::diagramTitleChanged(Diagram *diagram) {
|
||||||
Q_UNUSED(title)
|
|
||||||
GenericPanel::addDiagram(diagram);
|
GenericPanel::addDiagram(diagram);
|
||||||
emit(panelContentChanged());
|
emit(panelContentChanged());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class GenericPanel : public QTreeWidget {
|
|||||||
virtual void diagramAdded(QETProject *, Diagram *);
|
virtual void diagramAdded(QETProject *, Diagram *);
|
||||||
virtual void diagramRemoved(QETProject *, Diagram *);
|
virtual void diagramRemoved(QETProject *, Diagram *);
|
||||||
virtual void projectDiagramsOrderChanged(QETProject *, int, int);
|
virtual void projectDiagramsOrderChanged(QETProject *, int, int);
|
||||||
virtual void diagramTitleChanged(Diagram *, const QString &);
|
virtual void diagramTitleChanged(Diagram *);
|
||||||
virtual void templatesCollectionChanged(TitleBlockTemplatesCollection*,
|
virtual void templatesCollectionChanged(TitleBlockTemplatesCollection*,
|
||||||
const QString &);
|
const QString &);
|
||||||
virtual void diagramUsedTemplate(TitleBlockTemplatesCollection *,
|
virtual void diagramUsedTemplate(TitleBlockTemplatesCollection *,
|
||||||
|
|||||||
Reference in New Issue
Block a user