[qet] [2074] Prepare to add new texteditor action.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2074
Author:   scorpio810
Date:     2013-03-27 20:11:16 +0100 (Wed, 27 Mar 2013)
Log Message:
-----------
Prepare to add new texteditor action.

Modified Paths:
--------------
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetdiagrameditor.h
    trunk/sources/qeticons.cpp
    trunk/sources/qeticons.h

Added Paths:
-----------
    trunk/ico/Actions-format-text-bold-icon.png

Added: trunk/ico/Actions-format-text-bold-icon.png
===================================================================
(Binary files differ)


Property changes on: trunk/ico/Actions-format-text-bold-icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2013-03-25 17:29:07 UTC (rev 2073)
+++ trunk/sources/qetdiagrameditor.cpp	2013-03-27 19:11:16 UTC (rev 2074)
@@ -211,6 +211,7 @@
 	conductor_reset   = new QAction(QET::Icons::ConductorSettings,     tr("R\351initialiser les conducteurs"),     this);
 	infos_diagram     = new QAction(QET::Icons::DialogInformation,     tr("Propri\351t\351s du sch\351ma"),        this);
 	add_text          = new QAction(QET::Icons::PartTextField,         tr("Ajouter un champ de texte"),            this);
+	add_edittext          = new QAction(QET::Icons::EditText,         tr("Editer un champ de texte"),            this);
 	add_column        = new QAction(QET::Icons::EditTableInsertColumnRight, tr("Ajouter une colonne"),             this);
 	remove_column     = new QAction(QET::Icons::EditTableDeleteColumn,      tr("Enlever une colonne"),             this);
 	add_row           = new QAction(QET::Icons::EditTableInsertRowUnder,    tr("Ajouter une ligne"),               this);
@@ -331,6 +332,7 @@
 	
 	// traitements speciaux
 	add_text           -> setCheckable(true);
+	add_edittext       -> setCheckable(true);
 	windowed_view_mode -> setCheckable(true);
 	tabbed_view_mode   -> setCheckable(true);
 	mode_selection     -> setCheckable(true);
@@ -390,6 +392,7 @@
 	connect(conductor_reset,    SIGNAL(triggered()), this,       SLOT(slot_resetConductors())      );
 	connect(infos_diagram,      SIGNAL(triggered()), this,       SLOT(editCurrentDiagramProperties()));
 	connect(add_text,           SIGNAL(triggered()), this,       SLOT(slot_addText())              );
+	connect(add_edittext,       SIGNAL(triggered()), this,       SLOT(slot_editText())              );
 	connect(add_column,         SIGNAL(triggered()), this,       SLOT(slot_addColumn())            );
 	connect(remove_column,      SIGNAL(triggered()), this,       SLOT(slot_removeColumn())         );
 	connect(add_row,            SIGNAL(triggered()), this,       SLOT(slot_addRow())               );
@@ -551,6 +554,7 @@
 	diagram_bar -> addAction(infos_diagram);
 	diagram_bar -> addAction(conductor_reset);
 	diagram_bar -> addAction(add_text);
+	diagram_bar -> addAction(add_edittext);
 	
 	// ajout de la barre d'outils a la fenetre principale
 	addToolBar(Qt::TopToolBarArea, main_bar);
@@ -1133,6 +1137,7 @@
 	zoom_reset        -> setEnabled(opened_diagram);
 	infos_diagram     -> setEnabled(opened_diagram);
 	add_text          -> setEnabled(editable_diagram);
+	add_edittext      -> setEnabled(editable_diagram);
 	add_column        -> setEnabled(editable_diagram);
 	remove_column     -> setEnabled(editable_diagram);
 	add_row           -> setEnabled(editable_diagram);
@@ -1701,6 +1706,7 @@
 	connect(dv,              SIGNAL(selectionChanged()),         this,     SLOT(slot_updateComplexActions()));
 	connect(dv,              SIGNAL(modeChanged()),              this,     SLOT(slot_updateModeActions()));
 	connect(dv,              SIGNAL(textAdded(bool)),            add_text, SLOT(setChecked(bool)));
+	connect(dv,              SIGNAL(textAdded(bool)),            add_edittext, SLOT(setChecked(bool)));
 }
 
 /**

Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h	2013-03-25 17:29:07 UTC (rev 2073)
+++ trunk/sources/qetdiagrameditor.h	2013-03-27 19:11:16 UTC (rev 2074)
@@ -192,6 +192,7 @@
 	QAction *conductor_default;  ///< Show a dialog to edit default conductor properties
 	QAction *infos_diagram;      ///< Show a dialog to edit diagram properties
 	QAction *add_text;           ///< Tool to add an independent text item on diagrams
+	QAction *add_edittext;       ///< Tool to add an independent text item on diagrams
 	QAction *add_column;         ///< Increase diagram width by adding an extra column
 	QAction *remove_column;      ///< Decrease diagram width by removing the last column
 	QAction *add_row;            ///< Increase diagram height by adding an extra row

Modified: trunk/sources/qeticons.cpp
===================================================================
--- trunk/sources/qeticons.cpp	2013-03-25 17:29:07 UTC (rev 2073)
+++ trunk/sources/qeticons.cpp	2013-03-27 19:11:16 UTC (rev 2074)
@@ -71,6 +71,7 @@
 		QIcon EditTableInsertColumnRight;
 		QIcon EditTableInsertRowAbove;
 		QIcon EditTableInsertRowUnder;
+		QIcon EditText;
 		QIcon EditUndo;
 		QIcon Element;
 		QIcon ElementDelete;
@@ -219,6 +220,7 @@
 	East                .addFile(":/ico/16x16/east.png");
 	EditClear           .addFile(":/ico/16x16/edit-clear.png");
 	EditClear           .addFile(":/ico/22x22/edit-clear.png");
+	EditText           .addFile(":ico/Actions-format-text-bold-icon.png");
 	
 	if (rtl) {
 		EditClearLocationBar.addPixmap(QPixmap(":/ico/16x16/edit-clear-locationbar-ltr.png").transformed(reverse));

Modified: trunk/sources/qeticons.h
===================================================================
--- trunk/sources/qeticons.h	2013-03-25 17:29:07 UTC (rev 2073)
+++ trunk/sources/qeticons.h	2013-03-27 19:11:16 UTC (rev 2074)
@@ -78,6 +78,7 @@
 		extern QIcon EditTableInsertColumnRight;
 		extern QIcon EditTableInsertRowAbove;
 		extern QIcon EditTableInsertRowUnder;
+		extern QIcon EditText;
 		extern QIcon EditUndo;
 		extern QIcon Element;
 		extern QIcon ElementDelete;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/