mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Change terminal strip editor class
Change parent class from QDialog to QWidget. Terminal strip editor is now embedded in TerminalStripEditorWindow.
This commit is contained in:
@@ -116,6 +116,17 @@ TerminalStripModel::TerminalStripModel(TerminalStrip *terminal_strip, QObject *p
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripModel::setTerminalStrip
|
||||
* set the current terminal strip of this model to @a terminal_strip.
|
||||
* @param terminal_strip
|
||||
*/
|
||||
void TerminalStripModel::setTerminalStrip(TerminalStrip *terminal_strip)
|
||||
{
|
||||
m_terminal_strip = terminal_strip;
|
||||
reload();
|
||||
}
|
||||
|
||||
int TerminalStripModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
@@ -479,6 +490,19 @@ void TerminalStripModel::buildBridgePixmap(const QSize &pixmap_size)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalStripModel::reload
|
||||
* Reload (reset) the model
|
||||
*/
|
||||
void TerminalStripModel::reload()
|
||||
{
|
||||
beginResetModel();
|
||||
m_physical_data.clear();
|
||||
m_modified_cell.clear();
|
||||
fillPhysicalTerminalData();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void TerminalStripModel::fillPhysicalTerminalData()
|
||||
{
|
||||
//Get all physical terminal
|
||||
|
||||
Reference in New Issue
Block a user