mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-17 08:19:59 +01:00
User can export / import the configuration of the texts and texts group of an element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5195 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "QPropertyUndoCommand/qpropertyundocommand.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
#include "deleteqgraphicsitemcommand.h"
|
||||
#include "elementtextpattern.h"
|
||||
|
||||
#include <QTreeView>
|
||||
#include <QUndoCommand>
|
||||
@@ -40,9 +41,6 @@ DynamicElementTextItemEditor::DynamicElementTextItemEditor(Element *element, QWi
|
||||
ui->m_tree_view->installEventFilter(this);
|
||||
ui->m_remove_selection->setDisabled(true);
|
||||
|
||||
ui->m_export_pb->hide();
|
||||
ui->m_import_pb->hide();
|
||||
|
||||
setElement(element);
|
||||
}
|
||||
|
||||
@@ -256,3 +254,13 @@ void DynamicElementTextItemEditor::on_m_tree_view_clicked(const QModelIndex &ind
|
||||
else
|
||||
ui->m_remove_selection->setDisabled(true);
|
||||
}
|
||||
|
||||
void DynamicElementTextItemEditor::on_m_export_pb_clicked()
|
||||
{
|
||||
ExportElementTextPattern eetp(m_element);
|
||||
}
|
||||
|
||||
void DynamicElementTextItemEditor::on_m_import_pb_clicked()
|
||||
{
|
||||
ImportElementTextPattern ietp(m_element);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ class DynamicElementTextItemEditor : public AbstractElementPropertiesEditorWidge
|
||||
void on_m_remove_selection_clicked();
|
||||
void on_m_add_group_clicked();
|
||||
void on_m_tree_view_clicked(const QModelIndex &index);
|
||||
void on_m_export_pb_clicked();
|
||||
void on_m_import_pb_clicked();
|
||||
|
||||
private:
|
||||
Ui::DynamicElementTextItemEditor *ui;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>226</width>
|
||||
<height>234</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,7 +17,35 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<widget class="QToolButton" name="m_export_pb">
|
||||
<property name="toolTip">
|
||||
<string>Exporter l'actuelle configuration des textes</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/document-save.png</normaloff>:/ico/16x16/document-save.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_import_pb">
|
||||
<property name="toolTip">
|
||||
<string>Importer une configuration de texte</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/folder-open.png</normaloff>:/ico/16x16/folder-open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -30,40 +58,40 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_add_text">
|
||||
<widget class="QToolButton" name="m_add_text">
|
||||
<property name="toolTip">
|
||||
<string>Ajouter un texte</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Texte</string>
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||
<normaloff>:/ico/22x22/textfield.png</normaloff>:/ico/22x22/textfield.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_add_group">
|
||||
<widget class="QToolButton" name="m_add_group">
|
||||
<property name="toolTip">
|
||||
<string>Ajouter un groupe de textes</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Groupe</string>
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/list-add.png</normaloff>:/ico/16x16/list-add.png</iconset>
|
||||
<normaloff>:/ico/16x16/object-group.png</normaloff>:/ico/16x16/object-group.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_remove_selection">
|
||||
<widget class="QToolButton" name="m_remove_selection">
|
||||
<property name="toolTip">
|
||||
<string>Supprimer la sélection</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qelectrotech.qrc">
|
||||
@@ -93,22 +121,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="m_im_exp_layout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_export_pb">
|
||||
<property name="text">
|
||||
<string>Exporter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_import_pb">
|
||||
<property name="text">
|
||||
<string>Importer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<layout class="QHBoxLayout" name="m_im_exp_layout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user