mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-01 17:14:13 +02:00
Restore comments
This commit is contained in:
@@ -26,6 +26,12 @@
|
|||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QFontDialog>
|
#include <QFontDialog>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::TerminalEditor
|
||||||
|
* Default constructor
|
||||||
|
* @param editor : element editor of which this terminal editor belong
|
||||||
|
* @param parent : parent widget
|
||||||
|
*/
|
||||||
TerminalEditor::TerminalEditor(QETElementEditor *editor, QWidget *parent) :
|
TerminalEditor::TerminalEditor(QETElementEditor *editor, QWidget *parent) :
|
||||||
ElementItemEditor(editor, parent),
|
ElementItemEditor(editor, parent),
|
||||||
ui(new Ui::TerminalEditor)
|
ui(new Ui::TerminalEditor)
|
||||||
@@ -50,11 +56,20 @@ TerminalEditor::TerminalEditor(QETElementEditor *editor, QWidget *parent) :
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::~TerminalEditor
|
||||||
|
* Destructor
|
||||||
|
*/
|
||||||
TerminalEditor::~TerminalEditor()
|
TerminalEditor::~TerminalEditor()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::updateForm
|
||||||
|
* Reimplemented from ElementItemEditor
|
||||||
|
* Update the content of this widget
|
||||||
|
*/
|
||||||
void TerminalEditor::updateForm()
|
void TerminalEditor::updateForm()
|
||||||
{
|
{
|
||||||
if (!m_part) {
|
if (!m_part) {
|
||||||
@@ -89,6 +104,13 @@ void TerminalEditor::updateForm()
|
|||||||
activeConnections(true);
|
activeConnections(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::setPart
|
||||||
|
* Set the part to edit.
|
||||||
|
* The part must be a PartTerminal, in other case return false.
|
||||||
|
* @param new_part : the part to edit
|
||||||
|
* @return true if the part can be edited.
|
||||||
|
*/
|
||||||
bool TerminalEditor::setPart(CustomElementPart *new_part)
|
bool TerminalEditor::setPart(CustomElementPart *new_part)
|
||||||
{
|
{
|
||||||
if (m_part == new_part) {
|
if (m_part == new_part) {
|
||||||
@@ -113,11 +135,21 @@ bool TerminalEditor::setPart(CustomElementPart *new_part)
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::currentPart
|
||||||
|
* @return the current edited part
|
||||||
|
* or nullptr if there is no part or several part
|
||||||
|
* @see QList<CustomElementPart *> TerminalEditor::currentParts() const
|
||||||
|
*/
|
||||||
CustomElementPart *TerminalEditor::currentPart() const
|
CustomElementPart *TerminalEditor::currentPart() const
|
||||||
{
|
{
|
||||||
return m_part;
|
return m_part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::init
|
||||||
|
* Some init about this class
|
||||||
|
*/
|
||||||
void TerminalEditor::init()
|
void TerminalEditor::init()
|
||||||
{
|
{
|
||||||
ui->m_orientation_cb->addItem(QET::Icons::North, tr("Nord"), Qet::North);
|
ui->m_orientation_cb->addItem(QET::Icons::North, tr("Nord"), Qet::North);
|
||||||
@@ -135,6 +167,9 @@ void TerminalEditor::init()
|
|||||||
ui->m_text_props_gb->setEnabled(false);
|
ui->m_text_props_gb->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::posEdited
|
||||||
|
*/
|
||||||
void TerminalEditor::posEdited()
|
void TerminalEditor::posEdited()
|
||||||
{
|
{
|
||||||
if (m_locked) {
|
if (m_locked) {
|
||||||
@@ -156,6 +191,9 @@ void TerminalEditor::posEdited()
|
|||||||
m_locked = false;
|
m_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::orientationEdited
|
||||||
|
*/
|
||||||
void TerminalEditor::orientationEdited()
|
void TerminalEditor::orientationEdited()
|
||||||
{
|
{
|
||||||
if (m_locked) {
|
if (m_locked) {
|
||||||
@@ -174,6 +212,9 @@ void TerminalEditor::orientationEdited()
|
|||||||
m_locked = false;
|
m_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::nameEdited
|
||||||
|
*/
|
||||||
void TerminalEditor::nameEdited()
|
void TerminalEditor::nameEdited()
|
||||||
{
|
{
|
||||||
if (m_locked) {
|
if (m_locked) {
|
||||||
@@ -192,6 +233,9 @@ void TerminalEditor::nameEdited()
|
|||||||
m_locked=false;
|
m_locked=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::typeEdited
|
||||||
|
*/
|
||||||
void TerminalEditor::typeEdited()
|
void TerminalEditor::typeEdited()
|
||||||
{
|
{
|
||||||
if (m_locked) {
|
if (m_locked) {
|
||||||
@@ -208,6 +252,13 @@ void TerminalEditor::typeEdited()
|
|||||||
m_locked = false;
|
m_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief TerminalEditor::activeConnections
|
||||||
|
* Active connection between the widgets used in this editor
|
||||||
|
* and method of this class.
|
||||||
|
* @param active
|
||||||
|
*/
|
||||||
|
|
||||||
void TerminalEditor::showNameEdited()
|
void TerminalEditor::showNameEdited()
|
||||||
{
|
{
|
||||||
if (m_locked) return;
|
if (m_locked) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user