[qet] [864] Panel d'elements : ajout d' actions dans le menu contextuel pour changer l'ordre des schemas.

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


Revision: 864
Author:   xavier
Date:     2010-02-27 21:35:32 +0100 (Sat, 27 Feb 2010)
Log Message:
-----------
Panel d'elements : ajout d'actions dans le menu contextuel pour changer l'ordre des schemas.

Modified Paths:
--------------
    trunk/qelectrotech.qrc
    trunk/sources/elementspanel.cpp
    trunk/sources/elementspanelwidget.cpp
    trunk/sources/elementspanelwidget.h
    trunk/sources/projectview.cpp
    trunk/sources/projectview.h
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetdiagrameditor.h
    trunk/sources/qeticons.cpp
    trunk/sources/qeticons.h
    trunk/sources/qettabbar.h
    trunk/sources/qettabwidget.cpp
    trunk/sources/qettabwidget.h

Added Paths:
-----------
    trunk/ico/16x16/go-down.png
    trunk/ico/16x16/go-up.png
    trunk/ico/22x22/go-down.png
    trunk/ico/22x22/go-up.png

Added: trunk/ico/16x16/go-down.png
===================================================================
(Binary files differ)


Property changes on: trunk/ico/16x16/go-down.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/ico/16x16/go-up.png
===================================================================
(Binary files differ)


Property changes on: trunk/ico/16x16/go-up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/ico/22x22/go-down.png
===================================================================
(Binary files differ)


Property changes on: trunk/ico/22x22/go-down.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/ico/22x22/go-up.png
===================================================================
(Binary files differ)


Property changes on: trunk/ico/22x22/go-up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/qelectrotech.qrc
===================================================================
--- trunk/qelectrotech.qrc	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/qelectrotech.qrc	2010-02-27 20:35:32 UTC (rev 864)
@@ -44,7 +44,9 @@
 	<file>ico/16x16/endline-triangle.png</file>
 	<file>ico/16x16/folder-new.png</file>
 	<file>ico/16x16/folder.png</file>
+	<file>ico/16x16/go-down.png</file>
 	<file>ico/16x16/go-home.png</file>
+	<file>ico/16x16/go-up.png</file>
 	<file>ico/16x16/ground.png</file>
 	<file>ico/16x16/item_cancel.png</file>
 	<file>ico/16x16/item_copy.png</file>
@@ -118,7 +120,9 @@
 	<file>ico/22x22/folder-delete.png</file>
 	<file>ico/22x22/folder-edit.png</file>
 	<file>ico/22x22/folder-new.png</file>
+	<file>ico/22x22/go-down.png</file>
 	<file>ico/22x22/go-home.png</file>
+	<file>ico/22x22/go-up.png</file>
 	<file>ico/22x22/hotspot.png</file>
 	<file>ico/22x22/landscape.png</file>
 	<file>ico/22x22/line.png</file>

Modified: trunk/sources/elementspanel.cpp
===================================================================
--- trunk/sources/elementspanel.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/elementspanel.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -913,8 +913,12 @@
 	if (!moved_qtwi_diagram) return;
 	
 	// enleve le QTWI et le reinsere au bon endroit
+	bool was_selected = moved_qtwi_diagram -> isSelected();
 	qtwi_project -> removeChild(moved_qtwi_diagram);
 	qtwi_project -> insertChild(to, moved_qtwi_diagram);
+	if (was_selected) {
+		setCurrentItem(moved_qtwi_diagram);
+	}
 }
 
 /**

Modified: trunk/sources/elementspanelwidget.cpp
===================================================================
--- trunk/sources/elementspanelwidget.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/elementspanelwidget.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -48,24 +48,26 @@
 	elements_panel = new ElementsPanel(this);
 	
 	// initialise les actions
-	reload            = new QAction(QET::Icons::ViewRefresh,               tr("Recharger les collections"),           this);
-	new_category      = new QAction(QET::Icons::FolderNew,                 tr("Nouvelle cat\351gorie"),               this);
-	edit_category     = new QAction(QET::Icons::FolderEdit,                tr("\311diter la cat\351gorie"),           this);
-	delete_category   = new QAction(QET::Icons::FolderDelete,              tr("Supprimer la cat\351gorie"),           this);
-	delete_collection = new QAction(QET::Icons::FolderDelete,              tr("Vider la collection"),                 this);
-	new_element       = new QAction(QET::Icons::ElementNew,                tr("Nouvel \351l\351ment"),                this);
-	import_element    = new QAction(QET::Icons::DocumentImport,            tr("Importer un \351l\351ment"),           this);
-	edit_element      = new QAction(QET::Icons::ElementEdit,               tr("\311diter l'\351l\351ment"),           this);
-	delete_element    = new QAction(QET::Icons::ElementDelete,             tr("Supprimer l'\351l\351ment"),           this);
-	prj_close         = new QAction(QET::Icons::DocumentClose,             tr("Fermer ce projet"),                    this);
-	prj_edit_prop     = new QAction(QET::Icons::DialogInformation,         tr("Propri\351t\351s du projet"),          this);
-	prj_prop_diagram  = new QAction(QET::Icons::DialogInformation,         tr("Propri\351t\351s du sch\351ma"),       this);
-	prj_add_diagram   = new QAction(QET::Icons::DiagramAdd,                tr("Ajouter un sch\351ma"),                this);
-	prj_del_diagram   = new QAction(QET::Icons::DiagramDelete,             tr("Supprimer ce sch\351ma"),              this);
-	move_elements_    = new QAction(QET::Icons::MoveFile,                  tr("D\351placer dans cette cat\351gorie"), this);
-	copy_elements_    = new QAction(QET::Icons::CopyFile,                  tr("Copier dans cette cat\351gorie"),      this);
-	cancel_elements_  = new QAction(QET::Icons::Cancel,                    tr("Annuler"),                             this);
-	erase_textfield   = new QAction(QET::Icons::EditClearLocationBar,      tr("Effacer le filtre"),                   this);
+	reload                = new QAction(QET::Icons::ViewRefresh,               tr("Recharger les collections"),           this);
+	new_category          = new QAction(QET::Icons::FolderNew,                 tr("Nouvelle cat\351gorie"),               this);
+	edit_category         = new QAction(QET::Icons::FolderEdit,                tr("\311diter la cat\351gorie"),           this);
+	delete_category       = new QAction(QET::Icons::FolderDelete,              tr("Supprimer la cat\351gorie"),           this);
+	delete_collection     = new QAction(QET::Icons::FolderDelete,              tr("Vider la collection"),                 this);
+	new_element           = new QAction(QET::Icons::ElementNew,                tr("Nouvel \351l\351ment"),                this);
+	import_element        = new QAction(QET::Icons::DocumentImport,            tr("Importer un \351l\351ment"),           this);
+	edit_element          = new QAction(QET::Icons::ElementEdit,               tr("\311diter l'\351l\351ment"),           this);
+	delete_element        = new QAction(QET::Icons::ElementDelete,             tr("Supprimer l'\351l\351ment"),           this);
+	prj_close             = new QAction(QET::Icons::DocumentClose,             tr("Fermer ce projet"),                    this);
+	prj_edit_prop         = new QAction(QET::Icons::DialogInformation,         tr("Propri\351t\351s du projet"),          this);
+	prj_prop_diagram      = new QAction(QET::Icons::DialogInformation,         tr("Propri\351t\351s du sch\351ma"),       this);
+	prj_add_diagram       = new QAction(QET::Icons::DiagramAdd,                tr("Ajouter un sch\351ma"),                this);
+	prj_del_diagram       = new QAction(QET::Icons::DiagramDelete,             tr("Supprimer ce sch\351ma"),              this);
+	prj_move_diagram_up   = new QAction(QET::Icons::GoUp,                      tr("Remonter ce sch\351ma"),               this);
+	prj_move_diagram_down = new QAction(QET::Icons::GoDown,                    tr("Abaisser ce sch\351ma"),               this);
+	move_elements_        = new QAction(QET::Icons::MoveFile,                  tr("D\351placer dans cette cat\351gorie"), this);
+	copy_elements_        = new QAction(QET::Icons::CopyFile,                  tr("Copier dans cette cat\351gorie"),      this);
+	cancel_elements_      = new QAction(QET::Icons::Cancel,                    tr("Annuler"),                             this);
+	erase_textfield       = new QAction(QET::Icons::EditClearLocationBar,      tr("Effacer le filtre"),                   this);
 	
 	// initialise le champ de texte pour filtrer avec une disposition horizontale
 	QLabel *filter_label = new QLabel(tr("Filtrer : "), this);
@@ -84,29 +86,31 @@
 	
 	context_menu = new QMenu(this);
 	
-	connect(reload,            SIGNAL(triggered()), this,           SLOT(reloadAndFilter()));
-	connect(new_category,      SIGNAL(triggered()), this,           SLOT(newCategory()));
-	connect(edit_category,     SIGNAL(triggered()), this,           SLOT(editCategory()));
-	connect(delete_category,   SIGNAL(triggered()), this,           SLOT(deleteCategory()));
-	connect(delete_collection, SIGNAL(triggered()), this,           SLOT(deleteCategory()));
-	connect(new_element,       SIGNAL(triggered()), this,           SLOT(newElement()));
-	connect(import_element,    SIGNAL(triggered()), this,           SLOT(importElement()));
-	connect(edit_element,      SIGNAL(triggered()), this,           SLOT(editElement()));
-	connect(delete_element,    SIGNAL(triggered()), this,           SLOT(deleteElement()));
-	connect(prj_close,         SIGNAL(triggered()), this,           SLOT(closeProject()));
-	connect(prj_edit_prop,     SIGNAL(triggered()), this,           SLOT(editProjectProperties()));
-	connect(prj_prop_diagram,  SIGNAL(triggered()), this,           SLOT(editDiagramProperties()));
-	connect(prj_add_diagram,   SIGNAL(triggered()), this,           SLOT(newDiagram()));
-	connect(prj_del_diagram,   SIGNAL(triggered()), this,           SLOT(deleteDiagram()));
-	connect(move_elements_,    SIGNAL(triggered()), this,           SLOT(moveElements()));
-	connect(copy_elements_,    SIGNAL(triggered()), this,           SLOT(copyElements()));
+	connect(reload,                SIGNAL(triggered()), this,           SLOT(reloadAndFilter()));
+	connect(new_category,          SIGNAL(triggered()), this,           SLOT(newCategory()));
+	connect(edit_category,         SIGNAL(triggered()), this,           SLOT(editCategory()));
+	connect(delete_category,       SIGNAL(triggered()), this,           SLOT(deleteCategory()));
+	connect(delete_collection,     SIGNAL(triggered()), this,           SLOT(deleteCategory()));
+	connect(new_element,           SIGNAL(triggered()), this,           SLOT(newElement()));
+	connect(import_element,        SIGNAL(triggered()), this,           SLOT(importElement()));
+	connect(edit_element,          SIGNAL(triggered()), this,           SLOT(editElement()));
+	connect(delete_element,        SIGNAL(triggered()), this,           SLOT(deleteElement()));
+	connect(prj_close,             SIGNAL(triggered()), this,           SLOT(closeProject()));
+	connect(prj_edit_prop,         SIGNAL(triggered()), this,           SLOT(editProjectProperties()));
+	connect(prj_prop_diagram,      SIGNAL(triggered()), this,           SLOT(editDiagramProperties()));
+	connect(prj_add_diagram,       SIGNAL(triggered()), this,           SLOT(newDiagram()));
+	connect(prj_del_diagram,       SIGNAL(triggered()), this,           SLOT(deleteDiagram()));
+	connect(prj_move_diagram_up,   SIGNAL(triggered()), this,           SLOT(moveDiagramUp()));
+	connect(prj_move_diagram_down, SIGNAL(triggered()), this,           SLOT(moveDiagramDown()));
+	connect(move_elements_,        SIGNAL(triggered()), this,           SLOT(moveElements()));
+	connect(copy_elements_,        SIGNAL(triggered()), this,           SLOT(copyElements()));
 	
-	connect(erase_textfield,  SIGNAL(triggered()),                 this,             SLOT(clearFilterTextField()));
-	connect(filter_textfield, SIGNAL(textEdited(const QString &)), elements_panel,   SLOT(filter(const QString &)));
+	connect(erase_textfield,       SIGNAL(triggered()),                 this,             SLOT(clearFilterTextField()));
+	connect(filter_textfield,      SIGNAL(textEdited(const QString &)), elements_panel,   SLOT(filter(const QString &)));
 	
-	connect(elements_panel, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(updateButtons()));
-	connect(elements_panel, SIGNAL(customContextMenuRequested(const QPoint &)),               this, SLOT(handleContextMenu(const QPoint &)));
-	connect(elements_panel, SIGNAL(requestForCollectionItem(ElementsCollectionItem *)),       this, SLOT(handleCollectionRequest(ElementsCollectionItem *)));
+	connect(elements_panel,        SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(updateButtons()));
+	connect(elements_panel,        SIGNAL(customContextMenuRequested(const QPoint &)),               this, SLOT(handleContextMenu(const QPoint &)));
+	connect(elements_panel,        SIGNAL(requestForCollectionItem(ElementsCollectionItem *)),       this, SLOT(handleCollectionRequest(ElementsCollectionItem *)));
 	connect(
 		elements_panel,
 		SIGNAL(requestForMoveElements(ElementsCollectionItem *, ElementsCollectionItem *, QPoint)),
@@ -213,6 +217,24 @@
 }
 
 /**
+	Emet le signal requestForDiagramMoveUp avec le schema selectionne
+*/
+void ElementsPanelWidget::moveDiagramUp() {
+	if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
+		emit(requestForDiagramMoveUp(selected_diagram));
+	}
+}
+
+/**
+	Emet le signal requestForDiagramMoveDown avec le schema selectionne
+*/
+void ElementsPanelWidget::moveDiagramDown() {
+	if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
+		emit(requestForDiagramMoveDown(selected_diagram));
+	}
+}
+
+/**
 	Appelle l'assistant de creation de nouvel element
 */
 void ElementsPanelWidget::newElement() {
@@ -281,10 +303,17 @@
 		bool is_writable = !(elements_panel -> selectedProject() -> isReadOnly());
 		prj_add_diagram -> setEnabled(is_writable);
 	} else if (elements_panel -> selectedItemIsADiagram()) {
-		bool is_writable = !(elements_panel -> selectedDiagram() -> project() -> isReadOnly());
-		prj_del_diagram -> setEnabled(is_writable);
+		Diagram    *selected_diagram         = elements_panel -> selectedDiagram();
+		QETProject *selected_diagram_project = selected_diagram -> project();
+		
+		bool is_writable           = !(selected_diagram_project -> isReadOnly());
+		int project_diagrams_count = selected_diagram_project -> diagrams().count();
+		int diagram_position       = selected_diagram_project -> diagrams().indexOf(selected_diagram);
+		
+		prj_del_diagram       -> setEnabled(is_writable);
+		prj_move_diagram_up   -> setEnabled(is_writable && diagram_position > 0);
+		prj_move_diagram_down -> setEnabled(is_writable && diagram_position < project_diagrams_count - 1);
 	}
-	
 }
 
 /**
@@ -321,6 +350,7 @@
 	QTreeWidgetItem *item = elements_panel -> itemAt(pos);
 	if (!item) return;
 	
+	updateButtons();
 	context_menu -> clear();
 	
 	if (elements_panel -> itemHasLocation(item)) {
@@ -351,6 +381,8 @@
 		} else if (elements_panel -> itemIsADiagram(item)) {
 			context_menu -> addAction(prj_prop_diagram);
 			context_menu -> addAction(prj_del_diagram);
+			context_menu -> addAction(prj_move_diagram_up);
+			context_menu -> addAction(prj_move_diagram_down);
 		}
 	}
 	

Modified: trunk/sources/elementspanelwidget.h
===================================================================
--- trunk/sources/elementspanelwidget.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/elementspanelwidget.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -42,7 +42,7 @@
 	QAction *new_category, *edit_category, *delete_category;
 	QAction *delete_collection;
 	QAction *new_element, *import_element,  *edit_element,  *delete_element;
-	QAction *prj_close, *prj_edit_prop, *prj_prop_diagram, *prj_add_diagram, *prj_del_diagram;
+	QAction *prj_close, *prj_edit_prop, *prj_prop_diagram, *prj_add_diagram, *prj_del_diagram, *prj_move_diagram_up, *prj_move_diagram_down;
 	QAction *copy_elements_, *move_elements_, *cancel_elements_;
 	QMenu *context_menu;
 	QAction *erase_textfield;
@@ -59,6 +59,8 @@
 	void requestForProjectPropertiesEdition(QETProject *);
 	void requestForDiagramPropertiesEdition(Diagram *);
 	void requestForDiagramDeletion(Diagram *);
+	void requestForDiagramMoveUp(Diagram *);
+	void requestForDiagramMoveDown(Diagram *);
 	
 	public slots:
 	void clearFilterTextField();
@@ -68,6 +70,8 @@
 	void editDiagramProperties();
 	void newDiagram();
 	void deleteDiagram();
+	void moveDiagramUp();
+	void moveDiagramDown();
 	void newCategory();
 	void newElement();
 	void importElement();

Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/projectview.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -491,6 +491,48 @@
 }
 
 /**
+	Deplace le schema diagram_view vers le haut / la gauche
+*/
+void ProjectView::moveDiagramUp(DiagramView *diagram_view) {
+	if (!diagram_view) return;
+	
+	int diagram_view_position = diagram_ids_.key(diagram_view);
+	if (!diagram_view_position) {
+		// le schema est le premier du projet
+		return;
+	}
+	tabs_ -> tabBar() -> moveTab(diagram_view_position, diagram_view_position - 1);
+}
+
+/**
+	Deplace le schema diagram vers le haut / la gauche
+*/
+void ProjectView::moveDiagramUp(Diagram *diagram) {
+	moveDiagramUp(findDiagram(diagram));
+}
+
+/**
+	Deplace le schema diagram_view vers le bas / la droite
+*/
+void ProjectView::moveDiagramDown(DiagramView *diagram_view) {
+	if (!diagram_view) return;
+	
+	int diagram_view_position = diagram_ids_.key(diagram_view);
+	if (diagram_view_position + 1 == diagram_ids_.count()) {
+		// le schema est le dernier du projet
+		return;
+	}
+	tabs_ -> tabBar() -> moveTab(diagram_view_position, diagram_view_position + 1);
+}
+
+/**
+	Deplace le schema diagram vers le bas / la droite
+*/
+void ProjectView::moveDiagramDown(Diagram *diagram) {
+	moveDiagramDown(findDiagram(diagram));
+}
+
+/**
 	Ce slot demarre un dialogue permettant a l'utilisateur de parametrer et de
 	lancer l'impression de toute ou partie du projet.
 */

Modified: trunk/sources/projectview.h
===================================================================
--- trunk/sources/projectview.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/projectview.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -54,6 +54,10 @@
 	void editCurrentDiagramProperties();
 	void editDiagramProperties(DiagramView *);
 	void editDiagramProperties(Diagram *);
+	void moveDiagramUp(DiagramView *);
+	void moveDiagramUp(Diagram *);
+	void moveDiagramDown(DiagramView *);
+	void moveDiagramDown(Diagram *);
 	void printProject();
 	void exportProject();
 	bool save();

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qetdiagrameditor.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -67,11 +67,13 @@
 	connect(&(pa -> elementsPanel()), SIGNAL(requestForDiagram(Diagram *)),    this, SLOT(activateDiagram(Diagram *)));
 	connect(&(pa -> elementsPanel()), SIGNAL(requestForProject(QETProject *)), this, SLOT(activateProject(QETProject *)));
 	
-	connect(pa, SIGNAL(requestForProjectClosing(QETProject *)), this, SLOT(closeProject(QETProject *)));
+	connect(pa, SIGNAL(requestForProjectClosing(QETProject *)),           this, SLOT(closeProject(QETProject *)));
 	connect(pa, SIGNAL(requestForProjectPropertiesEdition(QETProject *)), this, SLOT(editProjectProperties(QETProject *)));
 	connect(pa, SIGNAL(requestForDiagramPropertiesEdition(Diagram *)),    this, SLOT(editDiagramProperties(Diagram *)));
-	connect(pa, SIGNAL(requestForNewDiagram(QETProject *)),     this, SLOT(addDiagramToProject(QETProject *)));
-	connect(pa, SIGNAL(requestForDiagramDeletion(Diagram *)),   this, SLOT(removeDiagram(Diagram *)));
+	connect(pa, SIGNAL(requestForNewDiagram(QETProject *)),               this, SLOT(addDiagramToProject(QETProject *)));
+	connect(pa, SIGNAL(requestForDiagramDeletion(Diagram *)),             this, SLOT(removeDiagram(Diagram *)));
+	connect(pa, SIGNAL(requestForDiagramMoveUp(Diagram *)),               this, SLOT(moveDiagramUp(Diagram *)));
+	connect(pa, SIGNAL(requestForDiagramMoveDown(Diagram *)),             this, SLOT(moveDiagramDown(Diagram *)));
 	
 	qdw_undo = new QDockWidget(tr("Annulations", "dock title"));
 	qdw_undo -> setObjectName("diagram_undo");
@@ -1607,6 +1609,44 @@
 }
 
 /**
+	Change l'ordre des schemas d'un projet, en decalant le schema vers le haut /
+	la gauche
+	@param diagram Schema a decaler vers le haut / la gauche
+*/
+void QETDiagramEditor::moveDiagramUp(Diagram *diagram) {
+	if (!diagram) return;
+	
+	// recupere le projet contenant le schema
+	if (QETProject *diagram_project = diagram -> project()) {
+		if (diagram_project -> isReadOnly()) return;
+		
+		// recupere la vue sur ce projet
+		if (ProjectView *project_view = findProject(diagram_project)) {
+			project_view -> moveDiagramUp(diagram);
+		}
+	}
+}
+
+/**
+	Change l'ordre des schemas d'un projet, en decalant le schema vers le bas /
+	la droite
+	@param diagram Schema a decaler vers le bas / la droite
+*/
+void QETDiagramEditor::moveDiagramDown(Diagram *diagram) {
+	if (!diagram) return;
+	
+	// recupere le projet contenant le schema
+	if (QETProject *diagram_project = diagram -> project()) {
+		if (diagram_project -> isReadOnly()) return;
+		
+		// recupere la vue sur ce projet
+		if (ProjectView *project_view = findProject(diagram_project)) {
+			project_view -> moveDiagramDown(diagram);
+		}
+	}
+}
+
+/**
 	Nettoie le projet courant
 */
 void QETDiagramEditor::cleanCurrentProject() {

Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qetdiagrameditor.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -141,6 +141,8 @@
 	void addDiagramToProject(QETProject *);
 	void removeDiagram(Diagram *);
 	void removeDiagramFromProject();
+	void moveDiagramUp(Diagram *);
+	void moveDiagramDown(Diagram *);
 	void cleanCurrentProject();
 	void diagramWasAdded(DiagramView *);
 	void diagramIsAboutToBeRemoved(DiagramView *);

Modified: trunk/sources/qeticons.cpp
===================================================================
--- trunk/sources/qeticons.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qeticons.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -80,6 +80,8 @@
 		QIcon Forbidden;
 		QIcon FullScreenEnter;
 		QIcon FullScreenExit;
+		QIcon GoDown;
+		QIcon GoUp;
 		QIcon Ground;
 		QIcon Hide;
 		QIcon Home;
@@ -240,6 +242,10 @@
 	FullScreenEnter     .addFile(":/ico/22x22/view-fullscreen.png");
 	FullScreenExit      .addFile(":/ico/16x16/view-restore.png");
 	FullScreenExit      .addFile(":/ico/22x22/view-restore.png");
+	GoDown              .addFile(":/ico/16x16/go-down.png");
+	GoDown              .addFile(":/ico/22x22/go-down.png");
+	GoUp                .addFile(":/ico/16x16/go-up.png");
+	GoUp                .addFile(":/ico/22x22/go-up.png");
 	Ground              .addFile(":/ico/16x16/ground.png");
 	Hide                .addFile(":/ico/16x16/masquer.png");
 	Home                .addFile(":/ico/16x16/go-home.png");

Modified: trunk/sources/qeticons.h
===================================================================
--- trunk/sources/qeticons.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qeticons.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -88,6 +88,8 @@
 		extern QIcon Forbidden;
 		extern QIcon FullScreenEnter;
 		extern QIcon FullScreenExit;
+		extern QIcon GoDown;
+		extern QIcon GoUp;
 		extern QIcon Ground;
 		extern QIcon Hide;
 		extern QIcon Home;

Modified: trunk/sources/qettabbar.h
===================================================================
--- trunk/sources/qettabbar.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qettabbar.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -45,6 +45,7 @@
 	bool isMovable() const;
 	bool isVertical() const;
 	bool isHorizontal() const;
+	void moveTab(int, int);
 	
 	protected:
 	virtual void tabInserted(int);
@@ -65,7 +66,6 @@
 	
 	private:
 	bool mustMoveTab(int, int, const QPoint &) const;
-	void moveTab(int, int);
 	int tabForPressedPosition(const QPoint &);
 	int tabForMovedPosition(const QPoint &);
 	bool posMatchesTabRect(const QRect &, const QPoint &) const;

Modified: trunk/sources/qettabwidget.cpp
===================================================================
--- trunk/sources/qettabwidget.cpp	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qettabwidget.cpp	2010-02-27 20:35:32 UTC (rev 864)
@@ -66,6 +66,10 @@
 #endif
 }
 
+QTabBar *QETTabWidget::tabBar() const {
+	return(QTabWidget::tabBar());
+}
+
 /**
 	Gere les evenements rollette sur cette barre d'onglets
 	@param event Evenement rollette

Modified: trunk/sources/qettabwidget.h
===================================================================
--- trunk/sources/qettabwidget.h	2010-02-26 12:06:15 UTC (rev 863)
+++ trunk/sources/qettabwidget.h	2010-02-27 20:35:32 UTC (rev 864)
@@ -40,6 +40,7 @@
 	public:
 	void setMovable(bool);
 	bool isMovable() const;
+	QTabBar *tabBar() const;
 	
 	protected:
 	void wheelEvent(QWheelEvent *);


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