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