From d3ef7a5f02fdf58b3b3df1dbe72f2f18547f7293 Mon Sep 17 00:00:00 2001 From: xavierqet Date: Tue, 28 Aug 2007 21:17:11 +0000 Subject: [PATCH] Ajout de boutons pour gerer les collections et elements git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@109 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- elementdeleter.cpp | 35 ++++++++++++++ elementdeleter.h | 22 +++++++++ elementscategorieswidget.cpp | 49 ++++---------------- elementscategorydeleter.cpp | 47 +++++++++++++++++++ elementscategorydeleter.h | 23 +++++++++ elementspanel.cpp | 87 ++++++++++++++++++++++++++++++----- elementspanel.h | 12 +++++ elementspanelwidget.cpp | 62 +++++++++++++++++++++++-- elementspanelwidget.h | 5 ++ ico/category_delete.png | Bin 0 -> 1066 bytes ico/category_edit.png | Bin 0 -> 1069 bytes ico/category_new.png | Bin 0 -> 1278 bytes ico/edit.png | Bin 0 -> 1076 bytes ico/new.png | Bin 686 -> 825 bytes ico/select.png | Bin 411 -> 523 bytes qelectrotech.pro | 10 ++-- qelectrotech.qrc | 4 ++ 17 files changed, 298 insertions(+), 58 deletions(-) create mode 100644 elementdeleter.cpp create mode 100644 elementdeleter.h create mode 100644 elementscategorydeleter.cpp create mode 100644 elementscategorydeleter.h create mode 100755 ico/category_delete.png create mode 100755 ico/category_edit.png create mode 100755 ico/category_new.png create mode 100755 ico/edit.png diff --git a/elementdeleter.cpp b/elementdeleter.cpp new file mode 100644 index 000000000..f10e69ee4 --- /dev/null +++ b/elementdeleter.cpp @@ -0,0 +1,35 @@ +#include "elementdeleter.h" + +ElementDeleter::ElementDeleter(const QString &elmt_path, QWidget *parent) : + QWidget(parent), + element_path(elmt_path) +{ +} + +ElementDeleter::~ElementDeleter() { +} + +void ElementDeleter::exec() { + // verifie l'existence de l'element + QFile elmt_file(element_path); + if (!elmt_file.exists()) return; + + // confirmation #1 + QMessageBox::StandardButton answer_1 = QMessageBox::question( + this, + tr("Supprimer l'\351l\351ment ?"), + tr("\312tes-vous s\373r de vouloir supprimer cet \351l\351ment ?\n"), + QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel + ); + if (answer_1 != QMessageBox::Yes) return; + + // supprime l'element + if (!elmt_file.remove()) { + QMessageBox::warning( + this, + tr("Suppression de l'\351l\351ment"), + tr("La suppression de l'\351l\351ment a \351chou\351.\n" + "V\351rifiez vos droits sur le fichier ") + element_path + tr(".") + ); + } +} diff --git a/elementdeleter.h b/elementdeleter.h new file mode 100644 index 000000000..192e819c1 --- /dev/null +++ b/elementdeleter.h @@ -0,0 +1,22 @@ +#ifndef ELEMENT_DELETER_H +#define ELEMENT_DELETER_H +#include "elementscategory.h" +#include +class ElementDeleter : public QWidget { + Q_OBJECT + // constructeurs, destructeur + public: + ElementDeleter(const QString &, QWidget * = 0); + virtual ~ElementDeleter(); + private: + ElementDeleter(const ElementsCategory &); + + // methodes + public slots: + void exec(); + + // attributs + private: + QString element_path; +}; +#endif diff --git a/elementscategorieswidget.cpp b/elementscategorieswidget.cpp index 373c824e9..dd46094f2 100644 --- a/elementscategorieswidget.cpp +++ b/elementscategorieswidget.cpp @@ -1,6 +1,7 @@ #include "elementscategorieswidget.h" #include "elementscategorieslist.h" #include "elementscategoryeditor.h" +#include "elementscategorydeleter.h" #include "elementscategory.h" /** @@ -12,10 +13,10 @@ ElementsCategoriesWidget::ElementsCategoriesWidget(QWidget *parent) : QWidget(pa elementscategorieslist = new ElementsCategoriesList(this); // actions - action_reload = new QAction(QIcon(":/ico/reload.png"), tr("Recharger les cat\351gories"), this); - action_new = new QAction(QIcon(":/ico/new.png"), tr("Nouvelle cat\351gorie"), this); - action_open = new QAction(QIcon(":/ico/open.png"), tr("\311diter la cat\351gorie"), this); - action_delete = new QAction(QIcon(":/ico/editdelete.png"), tr("Supprimer la cat\351gorie"), this); + action_reload = new QAction(QIcon(":/ico/reload.png"), tr("Recharger les cat\351gories"), this); + action_new = new QAction(QIcon(":/ico/category_new.png"), tr("Nouvelle cat\351gorie"), this); + action_open = new QAction(QIcon(":/ico/category_edit.png"), tr("\311diter la cat\351gorie"), this); + action_delete = new QAction(QIcon(":/ico/category_delete.png"), tr("Supprimer la cat\351gorie"), this); // initialise la barre d'outils toolbar = new QToolBar(this); @@ -74,46 +75,12 @@ void ElementsCategoriesWidget::editCategory() { Supprime la categorie selectionnee */ void ElementsCategoriesWidget::removeCategory() { - // recupere le nom et le chemin de la categorie - QString s_c_name = elementscategorieslist -> selectedCategoryName(); + // recupere le chemin de la categorie QString s_c_path = elementscategorieslist -> selectedCategoryPath(); - if (s_c_path.isNull()) return; - - // confirmation #1 - QMessageBox::StandardButton answer_1 = QMessageBox::question( - this, - tr("Supprimer la cat\351gorie ?"), - tr("\312tes-vous s\373r de vouloir supprimer cette cat\351gorie ?\n" - "Tous les \351l\351ments et les cat\351gories contenus dans cette " - "cat\351gorie seront supprim\351s"), - QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel - ); - if (answer_1 != QMessageBox::Yes) return; - - // confirmation #2 - QMessageBox::StandardButton answer_2 = QMessageBox::question( - this, - tr("Supprimer la cat\351gorie ?"), - tr("\312tes-vous vraiment s\373r de vouloir supprimer cette " - "cat\351gorie ?\nLes changements seront d\351finitifs."), - QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel - ); - if (answer_2 != QMessageBox::Yes) return; - - // verifie l'existence de la categorie - ElementsCategory category(s_c_path); - if (!category.exists()) return; - // supprime la categorie - if (!category.remove()) { - QMessageBox::warning( - this, - tr("Suppression de la cat\351gorie"), - tr("La suppression de la cat\351gorie a \351chou\351.\n" - "V\351rifiez vos droits sur le dossier ") + s_c_path + tr(".") - ); - } + ElementsCategoryDeleter cat_deleter(s_c_path, this); + cat_deleter.exec(); // recharge la liste des categories elementscategorieslist -> reload(); diff --git a/elementscategorydeleter.cpp b/elementscategorydeleter.cpp new file mode 100644 index 000000000..19adfbce5 --- /dev/null +++ b/elementscategorydeleter.cpp @@ -0,0 +1,47 @@ +#include "elementscategorydeleter.h" + +ElementsCategoryDeleter::ElementsCategoryDeleter(const QString &category_path, QWidget *parent) : + QWidget(parent), + cat(category_path), + empty_category_path(category_path.isNull()) +{ +} + +ElementsCategoryDeleter::~ElementsCategoryDeleter() { +} + +void ElementsCategoryDeleter::exec() { + // verifie l'existence de la categorie + if (!cat.exists() || empty_category_path) return; + + // confirmation #1 + QMessageBox::StandardButton answer_1 = QMessageBox::question( + this, + tr("Supprimer la cat\351gorie ?"), + tr("\312tes-vous s\373r de vouloir supprimer cette cat\351gorie ?\n" + "Tous les \351l\351ments et les cat\351gories contenus dans cette " + "cat\351gorie seront supprim\351s"), + QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel + ); + if (answer_1 != QMessageBox::Yes) return; + + // confirmation #2 + QMessageBox::StandardButton answer_2 = QMessageBox::question( + this, + tr("Supprimer la cat\351gorie ?"), + tr("\312tes-vous vraiment s\373r de vouloir supprimer cette " + "cat\351gorie ?\nLes changements seront d\351finitifs."), + QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel + ); + if (answer_2 != QMessageBox::Yes) return; + + // supprime la categorie + if (!cat.remove()) { + QMessageBox::warning( + this, + tr("Suppression de la cat\351gorie"), + tr("La suppression de la cat\351gorie a \351chou\351.\n" + "V\351rifiez vos droits sur le dossier ") + cat.absolutePath() + tr(".") + ); + } +} diff --git a/elementscategorydeleter.h b/elementscategorydeleter.h new file mode 100644 index 000000000..663d1758d --- /dev/null +++ b/elementscategorydeleter.h @@ -0,0 +1,23 @@ +#ifndef ELEMENTS_CATEGORY_DELETER_H +#define ELEMENTS_CATEGORY_DELETER_H +#include "elementscategory.h" +#include +class ElementsCategoryDeleter : public QWidget { + Q_OBJECT + // constructeurs, destructeur + public: + ElementsCategoryDeleter(const QString &, QWidget * = 0); + virtual ~ElementsCategoryDeleter(); + private: + ElementsCategoryDeleter(const ElementsCategory &); + + // methodes + public slots: + void exec(); + + // attributs + private: + ElementsCategory cat; + bool empty_category_path; +}; +#endif diff --git a/elementspanel.cpp b/elementspanel.cpp index 7c9e4aa05..c0647b39f 100644 --- a/elementspanel.cpp +++ b/elementspanel.cpp @@ -1,6 +1,8 @@ #include "elementspanel.h" #include "elementscategory.h" #include "elementscategoryeditor.h" +#include "elementscategorydeleter.h" +#include "elementdeleter.h" #include "customelement.h" #include "qetelementeditor.h" @@ -46,6 +48,20 @@ ElementsPanel::ElementsPanel(QWidget *parent) : QTreeWidget(parent) { ElementsPanel::~ElementsPanel() { } +/// @return true si un element est selectionne, false sinon +bool ElementsPanel::selectedItemIsAnElement() const { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists()) return(false); + return(infos_file.isFile()); +} + +/// @return true si une categorie est selectionnee, false sinon +bool ElementsPanel::selectedItemIsACategory() const { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists()) return(false); + return(infos_file.isDir()); +} + /** Gere le mouvement lors d'un drag'n drop */ @@ -167,24 +183,73 @@ void ElementsPanel::reload() { addDir(invisibleRootItem(), QETApp::customElementsDir(), tr("Collection utilisateur")); } -void ElementsPanel::slot_doubleClick(QTreeWidgetItem *qtwi, int) { - // recupere le fichier ou le dossier correspondant au QTreeWidgetItem - QString filename = qtwi -> data(0, 42).toString(); +void ElementsPanel::editCategory() { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists() || !infos_file.isDir()) return; + lauchCategoryEditor(infos_file.absoluteFilePath()); +} + +void ElementsPanel::editElement() { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists() || !infos_file.isFile()) return; + launchElementEditor(infos_file.absoluteFilePath()); +} + +void ElementsPanel::deleteCategory() { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists() || !infos_file.isDir()) return; + // supprime la categorie + ElementsCategoryDeleter cat_deleter(infos_file.absoluteFilePath(), this); + cat_deleter.exec(); + + // recharge la liste des categories + reload(); +} + +/** + supprime l'element selectionne +*/ +void ElementsPanel::deleteElement() { + QFileInfo infos_file = selectedFile(); + if (!infos_file.exists() || !infos_file.isFile()) return; + + // supprime l'element + ElementDeleter elmt_deleter(infos_file.absoluteFilePath(), this); + elmt_deleter.exec(); + + // recharge la liste des categories + reload(); +} + +void ElementsPanel::slot_doubleClick(QTreeWidgetItem *, int) { // le fichier doit exister - QFileInfo infos_file(filename); + QFileInfo infos_file = selectedFile(); if (!infos_file.exists()) return; - if (infos_file.isFile()) { // il s'agit d'un element - QETElementEditor *editor = new QETElementEditor(); - editor -> fromFile(filename); - editor -> show(); + launchElementEditor(infos_file.absoluteFilePath()); } else if (infos_file.isDir()) { // il s'agit d'une categorie - ElementsCategory c(filename); - ElementsCategoryEditor ece(filename, true); - if (ece.exec() == QDialog::Accepted) reload(); + lauchCategoryEditor(infos_file.absoluteFilePath()); } } + +/// @return un QFileInfo decrivant le fichier ou le dossier correspondant au QTreeWidgetItem selectionne +QFileInfo ElementsPanel::selectedFile() const { + QTreeWidgetItem *current_qtwi = currentItem(); + if(!current_qtwi) return(QFileInfo()); + return(QFileInfo(currentItem() -> data(0, 42).toString())); +} + +void ElementsPanel::launchElementEditor(const QString &filename) { + QETElementEditor *editor = new QETElementEditor(); + editor -> fromFile(filename); + editor -> show(); +} + +void ElementsPanel::lauchCategoryEditor(const QString &filename) { + ElementsCategoryEditor ece(filename, true); + if (ece.exec() == QDialog::Accepted) reload(); +} diff --git a/elementspanel.h b/elementspanel.h index c7bb510e9..4af587107 100644 --- a/elementspanel.h +++ b/elementspanel.h @@ -19,9 +19,17 @@ class ElementsPanel : public QTreeWidget { ElementsPanel(const ElementsPanel &); // methodes + public: + bool selectedItemIsAnElement() const; + bool selectedItemIsACategory() const; + private: void addFile(QTreeWidgetItem *, QString); void addDir(QTreeWidgetItem *, QString, QString = QString()); + QFileInfo selectedFile() const; + void launchElementEditor(const QString &); + void lauchCategoryEditor(const QString &); + public slots: void slot_doubleClick(QTreeWidgetItem *, int); @@ -29,5 +37,9 @@ class ElementsPanel : public QTreeWidget { void dropEvent(QDropEvent *); void startDrag(Qt::DropActions); void reload(); + void editCategory(); + void editElement(); + void deleteCategory(); + void deleteElement(); }; #endif diff --git a/elementspanelwidget.cpp b/elementspanelwidget.cpp index 37df6a2e3..2706a4d66 100644 --- a/elementspanelwidget.cpp +++ b/elementspanelwidget.cpp @@ -1,6 +1,6 @@ #include "elementspanelwidget.h" #include "newelementwizard.h" - +#include "elementscategorieswidget.h" /** Constructeur @param parent Le QWidget parent de ce widget @@ -9,11 +9,37 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) { // initalise le panel d'elements elements_panel = new ElementsPanel(this); + // initialise les actions + reload = new QAction(QIcon(":/ico/reload.png"), tr("Recharger les collections"), this); + new_category = new QAction(QIcon(":/ico/category_new.png"), tr("Nouvelle cat\351gorie"), this); + edit_category = new QAction(QIcon(":/ico/category_edit.png"), tr("\311diter la cat\351gorie"), this); + delete_category = new QAction(QIcon(":/ico/category_delete.png"), tr("Supprimer la cat\351gorie"), this); + new_element = new QAction(QIcon(":/ico/new.png"), tr("Nouvel \351l\351ment"), this); + edit_element = new QAction(QIcon(":/ico/edit.png"), tr("\311diter l'\351l\351ment"), this); + delete_element = new QAction(QIcon(":/ico/delete.png"), tr("Supprimer l'\351l\351ment"), this); + + connect(reload, SIGNAL(triggered()), elements_panel, SLOT(reload())); + connect(new_category, SIGNAL(triggered()), this, SLOT(newCategory())); + connect(edit_category, SIGNAL(triggered()), elements_panel, SLOT(editCategory())); + connect(delete_category, SIGNAL(triggered()), elements_panel, SLOT(deleteCategory())); + connect(new_element, SIGNAL(triggered()), this, SLOT(newElement())); + connect(edit_element, SIGNAL(triggered()), elements_panel, SLOT(editElement())); + connect(delete_element, SIGNAL(triggered()), elements_panel, SLOT(deleteElement())); + + connect(elements_panel, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(updateButtons())); + // initialise la barre d'outils toolbar = new QToolBar(this); toolbar -> setMovable(false); - toolbar -> addAction(QIcon(":/ico/reload.png"), tr("Recharger les collections"), elements_panel, SLOT(reload())); - toolbar -> addAction(QIcon(":/ico/new.png"), tr("Nouvel \351l\351ment"), this, SLOT(newElement())); + toolbar -> addAction(reload); + toolbar -> addSeparator(); + toolbar -> addAction(new_category); + toolbar -> addAction(edit_category); + toolbar -> addAction(delete_category); + toolbar -> addSeparator(); + toolbar -> addAction(new_element); + toolbar -> addAction(edit_element); + toolbar -> addAction(delete_element); // disposition verticale QVBoxLayout *vlayout = new QVBoxLayout(this); @@ -38,3 +64,33 @@ void ElementsPanelWidget::newElement() { NewElementWizard new_element_wizard; new_element_wizard.exec(); } + +void ElementsPanelWidget::newCategory() { + QDialog new_category_dialog; + new_category_dialog.setFixedSize(480, 280); + new_category_dialog.setWindowTitle(tr("Gestionnaire de cat\351gories")); + + QVBoxLayout *layout = new QVBoxLayout(&new_category_dialog); + QLabel *explication = new QLabel(tr("Vous pouvez utiliser ce gestionnaire pour ajouter, supprimer ou modifier les cat\351gories.")); + explication -> setAlignment(Qt::AlignJustify | Qt::AlignVCenter); + explication -> setWordWrap(true); + layout -> addWidget(explication); + + layout -> addWidget(new ElementsCategoriesWidget()); + + QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close); + connect(buttons, SIGNAL(rejected()), &new_category_dialog, SLOT(accept())); + layout -> addWidget(buttons); + + new_category_dialog.exec(); + elements_panel -> reload(); +} + +void ElementsPanelWidget::updateButtons() { + bool category_selected = elements_panel -> selectedItemIsACategory(); + bool element_selected = elements_panel -> selectedItemIsAnElement(); + edit_category -> setEnabled(category_selected); + delete_category -> setEnabled(category_selected); + edit_element -> setEnabled(element_selected); + delete_element -> setEnabled(element_selected); +} diff --git a/elementspanelwidget.h b/elementspanelwidget.h index 384caaef7..b483617a9 100644 --- a/elementspanelwidget.h +++ b/elementspanelwidget.h @@ -22,6 +22,9 @@ class ElementsPanelWidget : public QWidget { private: ElementsPanel *elements_panel; QToolBar *toolbar; + QAction *reload; + QAction *new_category, *edit_category, *delete_category; + QAction *new_element, *edit_element, *delete_element; // methodes public: @@ -29,6 +32,8 @@ class ElementsPanelWidget : public QWidget { public slots: void newElement(); + void newCategory(); + void updateButtons(); }; /** diff --git a/ico/category_delete.png b/ico/category_delete.png new file mode 100755 index 0000000000000000000000000000000000000000..cebff9233f1fbf92c183835897616f160788c4e8 GIT binary patch literal 1066 zcmV+_1l9YAP)bl}&6_MHI(>ckb;=%-CNLaf-5RD>g1ln#i zP%+p7eS`+E?R&TPz4qOA@11++xOhkKTJGojK)}6y-^AA+Gmzv0ZAgn@hmuw4SuNE|H+RW>g$;UcWSE~+Ll$JO&NOq zw;Md-kMrhRYpAVBAp%;LoqLa5W@xlPk_ci1$FUf>Vsm)o2|*iVaLb(o9CJGf{#4BH zxr;otyph#itLI4DaquEDiNnY5u4TFeB@KZF%Yt7AZgSwWfxA=D^u~ZJO)sR7%QLUi zp=LoPVnB=`F@hw5I~}t0v08R)UBQ{F;1wb7LotBdwJalNhPjo!g$%tq8}X{g7joi* zm1rRAhBVe!;seDPieY(kF#ykpRc~8t+}1<(@G;(bJ!0(qb#j>rsw!;|7;3Skxhu`J z(_=Vd1Pv5{Tw;;UMpW0Nm@L4bF5H|1Z(7LZW1ipEL)DY7P`9;6-{BOS8v5@@zfgFM z^rjYS7d0Xs0gf1h00Cgvr5L_6Lq$Ht_!PLFkn=QIH)hh+WWPK{-PR)2Z5yb5|7pJI z?c{~#a~!|YN&EILCgjp1->(%%#DypgN_BQXKl;c2_}!8f+&C} zpsBl^lUFv7-qZr607?OwL6;6sEGIEg0>->@E)xp^qtN+?NGrmavT2C4uz6*MuXTai|X$kGyYwn7)!xIa@u@K@28d9)8px%N-i!1Q5B@9A?t??XG;oqs!GbB{)^6xgbm0N68MHGg=J$v^Yuq~%z zG0;#0MN&~nm7u7oF~!7)G5X+x(F8#f`(TZcNCAzhn#d)_G~kol^0r#|gA)g-Wl1x@hGUzb zBEp@!f0>oqk9+GZfYx{0Wz&7Dsa#l!)*(S)2m*ssqBz+4JsQW0n<8}h z^eFT56Kvgf8x^q#BA|8AdDo#{ejP{?hJqNuaV&cJY~H#1h@cJ9{_soy$NVKiek!2* zhcnz#yNI=St(}!x!@)CTLx+7YtS3`|f`(}gmIWt|kFn<1YChS1vkY~7!}D#SWi8oq zTvk*sAe~5YRn#F?9z_g@F@#2tP)KGxR$Ny>!(*%Xt{>bSr1FrPhQv^ut-~8xw`nuW z^I6&sze%5$!KtfRz>$}4L<8}p$D)N%@<1+toL9V@n+7)zKaCV$=>?EZX+}DR*{-X>{Qnju?Xg(|~<-gznBPC8-D#Q;>9pgsX`s116K2 z$%H237Vz90`)W3@ar=|RoEZMld-$hdXzCu~^DP>Wisgt1K2R_)HU)X7jO3_?QxZi7 zg4P#XpbgCn>bQT$)5N0Xczqu*)|DmEm0_ayeHxEy3&05t6o3)8sAXuuv{C4kkFOP8 zP}J1Z;A>&0zmocL00!8MCZaN`9G zLZz*79gQ2+q)UA^Zf;;{RV7~kA;!D1bpD)Xpf{lL>|vhy`v*}XR7apX0+baGjRAjI z37!|AHFzFqZE^Cz6I{Fa70l#8#=CO-(U)bQH(>d5C!neSqPkaRjz+H(*tU)1C~RBJ z>{U0cVV-2k#&6>HQy!;Jd92#mfl><0#Ti@wO#Y)z*=p=wiIT zhxk~ITVLzM_cgXX2UyJ9WTikUg-D36r}2&AM32j(o8P7??@>`GaBh4A9fkxtm<6_2 nzUO}%dNQzkrYfu}HBA2m0=|E|zo6K!00000NkvXXu0mjf&e{9O literal 0 HcmV?d00001 diff --git a/ico/category_new.png b/ico/category_new.png new file mode 100755 index 0000000000000000000000000000000000000000..1277281fcc2667bb7ddc1189a78738ac96074bd8 GIT binary patch literal 1278 zcmVy^*KUEo|NhTsV`C2Z^7Xf2Tdl_hbTu%C0t65fv4*zv z?hfGKWW66AXcUkfW6ALQ&%gQj)B^+%LDV^MuR>e@p8Z>Q-uVCd%kTg1-u?Xl;lr>0 zdk@|JUr@QZ0Go?J7$AVaVQf`-5hI|Fwd*tXOg>P+$Insk<)R}XBE-$``}bdlKY#v# zF$*gb!=zb9KD>DK#c)Qi{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#64_=w_cNQF$h?>w7#=+SzII1r2Sp+fjY1;Pgbb;+ zivvT+jg`eWndehy8UX2Z+H#z7U9DXzA^O+L9G;&m6K)Z_V8&?Sg1BXFuv@Y>kZRU!KQF=$=%b&s*GLXme% z*fNkv$q*>D>AznK$03%#e@!`GAa?Qy!iW88gpZoPQA zS89R2)J|_f2++eO?fo|}!vZ7RWH)>!*R9H8u}JVUZKn;pQZKp=$mg=f`;Ri#rVl8k jR6}=xJqoCl);xe;*cReB_XVpy00000NkvXXu0mjfS^6jF diff --git a/ico/select.png b/ico/select.png index 06fa1aa75817c3df3c1af561dfd02d04baf39b83..22dfe6963b738dd17f4fafaa73532fc30038b495 100644 GIT binary patch literal 523 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP>?0v z(btiIVPjv-@4(4GzCyA`kS_y6l_~>6Lo)-z&;LOBB?CjL0RzLU1O^7H84L{K`IF+0 zx-l>?HhQ`^hE&{2`t$$4J+m%@1A}3ra8Gyl@AD^4oZvmOriF)L6=QMC6iB_0-t!_HMG~oK)LrT0{*YzEk?Gm&b92gWD3U*0oq;nrln4Va;RjKI6 z!r6=h4iT|DB`Xz7j_r3+W|L-MJzTBuufbPHp<%-=iC02-Pc|^Os@jDw2C4M1(D}`K zB;L_v(uZ)Fb6kb zJK4F?ONtqoIzpN!9-hxT%kjWW*1Iwd49pCb@*jUz{jog*j5r2QS3j3^P6!lvI6;RN#5=* z3}zr`QTOW+P=vFyz3})sQ60r& z5(&5Z?@F$a-FTR@`d{2Zxs=b`xwqq9aWN$GC>3SQIwq{I=PPr3)hesluXVTF1aGc+ zc}jahp^Wx|)X1uijuN>I;jfrBNF8MQ;C}h%2UcNK^{LagZqow>8-u5-pUXO@geCwl CexSVo diff --git a/qelectrotech.pro b/qelectrotech.pro index 1f1269902..69eb34db1 100644 --- a/qelectrotech.pro +++ b/qelectrotech.pro @@ -58,7 +58,9 @@ HEADERS += aboutqet.h \ editor/styleeditor.h \ editor/terminaleditor.h \ editor/texteditor.h \ - editor/textfieldeditor.h + editor/textfieldeditor.h \ + elementscategorydeleter.h \ + elementdeleter.h SOURCES += aboutqet.cpp \ borderinset.cpp \ conducer.cpp \ @@ -110,8 +112,10 @@ SOURCES += aboutqet.cpp \ editor/styleeditor.cpp \ editor/terminaleditor.cpp \ editor/texteditor.cpp \ - editor/textfieldeditor.cpp + editor/textfieldeditor.cpp \ + elementscategorydeleter.cpp \ + elementdeleter.cpp RESOURCES += qelectrotech.qrc TRANSLATIONS += lang/qet_en.ts lang/qt_fr.ts QT += xml -CONFIG += release +CONFIG += debug_and_release diff --git a/qelectrotech.qrc b/qelectrotech.qrc index 803f06186..67b1ed701 100644 --- a/qelectrotech.qrc +++ b/qelectrotech.qrc @@ -8,12 +8,16 @@ ico/arc.png ico/button_cancel.png ico/button_ok.png + ico/category_delete.png + ico/category_edit.png + ico/category_new.png ico/circle.png ico/configure.png ico/copy.png ico/cut.png ico/delete.png ico/east.png + ico/edit.png ico/editdelete.png ico/ellipse.png ico/entrer_fs.png