mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Table widget : Enable arrow to quicly switch to previous/next linked table
This commit is contained in:
parent
de88b32e5b
commit
042faeae32
@ -250,6 +250,9 @@ void GraphicsTablePropertiesEditor::updateUi()
|
|||||||
}
|
}
|
||||||
m_edit_connection.clear();
|
m_edit_connection.clear();
|
||||||
|
|
||||||
|
ui->m_next_pb->setEnabled(m_table_item->nextTable());
|
||||||
|
ui->m_previous_pb->setEnabled(m_table_item->previousTable());
|
||||||
|
|
||||||
ui->m_table_name_le->setText(m_table_item->tableName());
|
ui->m_table_name_le->setText(m_table_item->tableName());
|
||||||
ui->m_x_pos->setValue(m_table_item->pos().x());
|
ui->m_x_pos->setValue(m_table_item->pos().x());
|
||||||
ui->m_y_pos->setValue(m_table_item->pos().y());
|
ui->m_y_pos->setValue(m_table_item->pos().y());
|
||||||
@ -344,3 +347,21 @@ void GraphicsTablePropertiesEditor::on_m_previous_table_cb_activated(int index)
|
|||||||
m_table_item->setPreviousTable(m_other_table_vector.at(ui->m_previous_table_cb->currentData().toInt()));
|
m_table_item->setPreviousTable(m_other_table_vector.at(ui->m_previous_table_cb->currentData().toInt()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphicsTablePropertiesEditor::on_m_previous_pb_clicked()
|
||||||
|
{
|
||||||
|
auto new_table = m_table_item->previousTable();
|
||||||
|
auto old_table = m_table_item;
|
||||||
|
new_table->diagram()->showMe();
|
||||||
|
new_table->setSelected(true);
|
||||||
|
old_table->setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphicsTablePropertiesEditor::on_m_next_pb_clicked()
|
||||||
|
{
|
||||||
|
auto new_table = m_table_item->nextTable();
|
||||||
|
auto old_table = m_table_item;
|
||||||
|
new_table->diagram()->showMe();
|
||||||
|
new_table->setSelected(true);
|
||||||
|
old_table->setSelected(false);
|
||||||
|
}
|
||||||
|
@ -53,8 +53,10 @@ class GraphicsTablePropertiesEditor : public PropertiesEditorWidget
|
|||||||
virtual void updateUi() override;
|
virtual void updateUi() override;
|
||||||
void on_m_table_name_le_textEdited(const QString &arg1);
|
void on_m_table_name_le_textEdited(const QString &arg1);
|
||||||
void on_m_previous_table_cb_activated(int index);
|
void on_m_previous_table_cb_activated(int index);
|
||||||
|
void on_m_previous_pb_clicked();
|
||||||
|
void on_m_next_pb_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setUpEditConnection();
|
void setUpEditConnection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
<item row="1" column="7">
|
<item row="1" column="7">
|
||||||
<widget class="QPushButton" name="m_next_pb">
|
<widget class="QPushButton" name="m_next_pb">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tableau suivant</string>
|
<string>Tableau suivant</string>
|
||||||
@ -126,9 +126,9 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="6">
|
<item row="1" column="6">
|
||||||
<widget class="QPushButton" name="m_previous_cb">
|
<widget class="QPushButton" name="m_previous_pb">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tableau précédent</string>
|
<string>Tableau précédent</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user