[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 8421a8499180144f1980fbff2a44fee85e0887ba

Eugeniy Meshcheryakov eugen at debian.org
Tue Sep 30 13:59:39 UTC 2008


The following commit has been merged in the master branch:
commit dcb47464ca993fdc899e552b6dbecb35003b510f
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date:   Tue Sep 16 11:43:00 2008 +0200

    remove "Change Color" and "Reset Color" actions
    
    They are now in accessible as glyph properties

diff --git a/gui/glyphsgridwidget.cxx b/gui/glyphsgridwidget.cxx
index 202c907..9f1be71 100644
--- a/gui/glyphsgridwidget.cxx
+++ b/gui/glyphsgridwidget.cxx
@@ -23,7 +23,6 @@
 #include <QMenu>
 #include <QDebug>
 #include "glyphsmodel.h"
-#include <QColorDialog>
 #include "glyphpropertieseditor.h"
 #include "ttieditor.h"
 #include "glyphdelegate.h"
@@ -43,10 +42,6 @@ GlyphsGridWidget::GlyphsGridWidget(unsigned int cellSize, QWidget *parent) : QLi
 	connect(editInstructionsAction, SIGNAL(triggered()), this, SLOT(editInstructions()));
 	deleteGlyphAction = new QAction("Delete Glyph", this);
 	connect(deleteGlyphAction, SIGNAL(triggered()), this, SLOT(deleteGlyph()));
-	changeColorAction = new QAction("Change Color...", this);
-	connect(changeColorAction, SIGNAL(triggered()), this, SLOT(changeColor()));
-	resetColorAction = new QAction("Reset Color", this);
-	connect(resetColorAction, SIGNAL(triggered()), this, SLOT(resetColor()));
 	glyphPropAction = new QAction("Glyph Properties...", this);
 	connect(glyphPropAction, SIGNAL(triggered()), this, SLOT(glyphProperties()));
 	GlyphDelegate *delegate = new GlyphDelegate(this, gridSize());
@@ -70,38 +65,11 @@ void GlyphsGridWidget::contextMenuEvent(QContextMenuEvent *event)
 		menu.addAction(editInstructionsAction);
 		menu.addAction(deleteGlyphAction);
 		menu.addSeparator();
-		menu.addAction(changeColorAction);
-		menu.addAction(resetColorAction);
-		menu.addSeparator();
 		menu.addAction(glyphPropAction);
 		menu.exec(event->globalPos());
 	}
 }
 
-void GlyphsGridWidget::changeColor()
-{
-	QModelIndex index = currentIndex();
-	if (!index.isValid())
-		return;
-
-	QModelIndex colorIndex = index.sibling(index.row(), GlyphsModel::ColorColumn);
-	QColor color = colorIndex.data().value<QColor>();
-	QColor newColor = QColorDialog::getColor(color, this);
-
-	if (newColor.isValid())
-		model()->setData(colorIndex, newColor);
-}
-
-void GlyphsGridWidget::resetColor()
-{
-	QModelIndex index = currentIndex();
-	if (!index.isValid())
-		return;
-	QModelIndex colorIndex = index.sibling(index.row(), GlyphsModel::ColorColumn);
-
-	model()->setData(colorIndex, QVariant());
-}
-
 void GlyphsGridWidget::glyphProperties()
 {
 	QModelIndex index = currentIndex();
diff --git a/gui/glyphsgridwidget.h b/gui/glyphsgridwidget.h
index 396afc3..02b0906 100644
--- a/gui/glyphsgridwidget.h
+++ b/gui/glyphsgridwidget.h
@@ -25,8 +25,6 @@ public:
 
 	void setCellSize(unsigned int newSize);
 public slots:
-	void changeColor();
-	void resetColor();
 	void glyphProperties();
 	void deleteGlyph();
 	void editInstructions();
@@ -35,8 +33,6 @@ protected:
 private:
 	QAction *editInstructionsAction;
 	QAction *deleteGlyphAction;
-	QAction *changeColorAction;
-	QAction *resetColorAction;
 	QAction *glyphPropAction;
 };
 

-- 
Fondue Font Editor



More information about the fondue-commits mailing list