mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +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));
|
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_add_terminal_strip_pb_clicked();
|
||||||
void on_m_remove_terminal_strip_pb_clicked();
|
void on_m_remove_terminal_strip_pb_clicked();
|
||||||
|
|
||||||
|
void on_m_reload_pb_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::TerminalStripEditor *ui;
|
Ui::TerminalStripEditor *ui;
|
||||||
QETProject *m_project = nullptr;
|
QETProject *m_project = nullptr;
|
||||||
|
|||||||
@@ -6,15 +6,26 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>923</width>
|
<width>805</width>
|
||||||
<height>484</height>
|
<height>502</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Gestionnaire de borniers</string>
|
<string>Gestionnaire de borniers</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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"/>
|
<widget class="QTableView" name="tableView"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
@@ -22,16 +33,24 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ajouter un bornier</string>
|
<string>Ajouter un bornier</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="icon">
|
||||||
</item>
|
<iconset resource="../../../qelectrotech.qrc">
|
||||||
<item row="0" column="1">
|
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||||
<widget class="QPushButton" name="m_remove_terminal_strip_pb">
|
|
||||||
<property name="text">
|
|
||||||
<string>Supprimer le bornier</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<widget class="TerminalStripTreeWidget" name="m_terminal_strip_tw">
|
||||||
<property name="dragEnabled">
|
<property name="dragEnabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@@ -61,6 +80,8 @@
|
|||||||
<header location="global">terminalstriptreewidget.h</header>
|
<header location="global">terminalstriptreewidget.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../../../qelectrotech.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user