[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 8421a8499180144f1980fbff2a44fee85e0887ba
Eugeniy Meshcheryakov
eugen at debian.org
Tue Sep 30 13:59:37 UTC 2008
The following commit has been merged in the master branch:
commit 829bea053ed81025142a7aff7bd808b81c7a4f22
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date: Sun Sep 14 19:20:57 2008 +0200
rename GlyphsModelDelegate to GlyphDelegate
diff --git a/gui/glyphsmodeldelegate.cxx b/gui/glyphdelegate.cxx
similarity index 92%
rename from gui/glyphsmodeldelegate.cxx
rename to gui/glyphdelegate.cxx
index 2395991..38557cb 100644
--- a/gui/glyphsmodeldelegate.cxx
+++ b/gui/glyphdelegate.cxx
@@ -13,14 +13,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "glyphsmodeldelegate.h"
+#include "glyphdelegate.h"
#include <QModelIndex>
#include "glyphsmodel.h"
#include <QPainter>
#include <QPen>
#include <QDebug>
-void GlyphsModelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+void GlyphDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
if (option.rect.width() >= option.rect.height())
return; // TODO should be asserted
@@ -98,7 +98,7 @@ void GlyphsModelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
painter->restore();
}
-QSize GlyphsModelDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
+QSize GlyphDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
Q_UNUSED(index);
Q_UNUSED(option);
diff --git a/gui/glyphsmodeldelegate.h b/gui/glyphdelegate.h
similarity index 81%
rename from gui/glyphsmodeldelegate.h
rename to gui/glyphdelegate.h
index b9119f6..7b31019 100644
--- a/gui/glyphsmodeldelegate.h
+++ b/gui/glyphdelegate.h
@@ -13,14 +13,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GLYPHSMODELDELEGATE_H
-#define GLYPHSMODELDELEGATE_H
+#ifndef GLYPHDELEGATE_H
+#define GLYPHDELEGATE_H
#include <QAbstractItemDelegate>
-class GlyphsModelDelegate : public QAbstractItemDelegate {
+class GlyphDelegate : public QAbstractItemDelegate {
Q_OBJECT
public:
- GlyphsModelDelegate(QObject *parent, const QSize &cellSize) : QAbstractItemDelegate(parent), m_cellSize(cellSize) {}
+ GlyphDelegate(QObject *parent, const QSize &cellSize) : QAbstractItemDelegate(parent), m_cellSize(cellSize) {}
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
void setCellSize(const QSize &cellSize) {m_cellSize = cellSize;}
diff --git a/gui/glyphsgridwidget.cxx b/gui/glyphsgridwidget.cxx
index 02d42df..202c907 100644
--- a/gui/glyphsgridwidget.cxx
+++ b/gui/glyphsgridwidget.cxx
@@ -26,7 +26,7 @@
#include <QColorDialog>
#include "glyphpropertieseditor.h"
#include "ttieditor.h"
-#include "glyphsmodeldelegate.h"
+#include "glyphdelegate.h"
GlyphsGridWidget::GlyphsGridWidget(unsigned int cellSize, QWidget *parent) : QListView(parent)
{
@@ -49,7 +49,7 @@ GlyphsGridWidget::GlyphsGridWidget(unsigned int cellSize, QWidget *parent) : QLi
connect(resetColorAction, SIGNAL(triggered()), this, SLOT(resetColor()));
glyphPropAction = new QAction("Glyph Properties...", this);
connect(glyphPropAction, SIGNAL(triggered()), this, SLOT(glyphProperties()));
- GlyphsModelDelegate *delegate = new GlyphsModelDelegate(this, gridSize());
+ GlyphDelegate *delegate = new GlyphDelegate(this, gridSize());
setItemDelegate(delegate);
setCellSize(cellSize);
}
@@ -58,7 +58,7 @@ void GlyphsGridWidget::setCellSize(unsigned int newSize)
{
// FIXME 18 = 12 (default font size) + 6 (antialiasing)
setGridSize(QSize(newSize, newSize + 18));
- GlyphsModelDelegate *delegate = qobject_cast<GlyphsModelDelegate *>(itemDelegate());
+ GlyphDelegate *delegate = qobject_cast<GlyphDelegate *>(itemDelegate());
if (delegate)
delegate->setCellSize(gridSize());
}
diff --git a/gui/gui.rules b/gui/gui.rules
index 8d1b26d..ec5a807 100644
--- a/gui/gui.rules
+++ b/gui/gui.rules
@@ -11,7 +11,7 @@ libfonduegui_a_SOURCES = \
gui/glyphsgridwidget.cxx \
gui/glyphiconengine.cxx \
gui/glyphsmodel.cxx \
- gui/glyphsmodeldelegate.cxx \
+ gui/glyphdelegate.cxx \
gui/glyphpropertieseditor.cxx \
gui/colorcombobox.cxx \
gui/unicodevalueeditor.cxx \
@@ -34,7 +34,7 @@ nodist_libfonduegui_a_SOURCES = \
gui/unicodevalueeditor.moc.cxx \
gui/ttieditor.moc.cxx \
gui/glyphsmodel.moc.cxx \
- gui/glyphsmodeldelegate.moc.cxx \
+ gui/glyphdelegate.moc.cxx \
gui/unicodeproxymodel.moc.cxx \
gui/cvteditor.moc.cxx \
gui/maxpeditor.moc.cxx \
@@ -60,7 +60,7 @@ noinst_HEADERS += \
gui/glyphsgridwidget.h \
gui/glyphiconengine.h \
gui/glyphsmodel.h \
- gui/glyphsmodeldelegate.h \
+ gui/glyphdelegate.h \
gui/glyphpropertieseditor.h \
gui/unicodevalueeditor.h \
gui/colorcombobox.h \
--
Fondue Font Editor
More information about the fondue-commits
mailing list