mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Add a reload push button
Add a reload push button to quickly reload/update the gui according to the current state of the terminal strip.
This commit is contained in:
@@ -262,4 +262,19 @@ void TerminalStripEditor::on_m_remove_terminal_strip_pb_clicked()
|
||||
|
||||
m_project->undoStack()->push(new RemoveTerminalStripCommand(strip, m_project));
|
||||
}
|
||||
|
||||
on_m_reload_pb_clicked();
|
||||
}
|
||||
|
||||
void TerminalStripEditor::on_m_reload_pb_clicked()
|
||||
{
|
||||
ui->m_terminal_strip_tw->clear();
|
||||
m_item_strip_H.clear();
|
||||
m_uuid_terminal_H.clear();
|
||||
m_uuid_strip_H.clear();
|
||||
|
||||
qDeleteAll(m_item_strip_H.keys());
|
||||
|
||||
buildTree();
|
||||
ui->m_terminal_strip_tw->expandRecursively(ui->m_terminal_strip_tw->rootIndex());
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ class TerminalStripEditor : public QDialog
|
||||
void on_m_add_terminal_strip_pb_clicked();
|
||||
void on_m_remove_terminal_strip_pb_clicked();
|
||||
|
||||
void on_m_reload_pb_clicked();
|
||||
|
||||
private:
|
||||
Ui::TerminalStripEditor *ui;
|
||||
QETProject *m_project = nullptr;
|
||||
|
||||
@@ -6,15 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>923</width>
|
||||
<height>484</height>
|
||||
<width>805</width>
|
||||
<height>502</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Gestionnaire de borniers</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="2">
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="m_remove_terminal_strip_pb">
|
||||
<property name="text">
|
||||
<string>Supprimer le bornier</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/list-remove.png</normaloff>:/ico/16x16/list-remove.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QTableView" name="tableView"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
@@ -22,16 +33,24 @@
|
||||
<property name="text">
|
||||
<string>Ajouter un bornier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="m_remove_terminal_strip_pb">
|
||||
<property name="text">
|
||||
<string>Supprimer le bornier</string>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="m_reload_pb">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/view-refresh.png</normaloff>:/ico/16x16/view-refresh.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="TerminalStripTreeWidget" name="m_terminal_strip_tw">
|
||||
<property name="dragEnabled">
|
||||
<bool>false</bool>
|
||||
@@ -61,6 +80,8 @@
|
||||
<header location="global">terminalstriptreewidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../../qelectrotech.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user