[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master ec2ce48 1/7: [ftinspect] Add signal for Hinting
From: |
Werner LEMBERG |
Subject: |
[freetype2-demos] master ec2ce48 1/7: [ftinspect] Add signal for HintingModeComboBox. |
Date: |
Sun, 01 May 2016 08:05:41 +0000 |
branch: master
commit ec2ce48a6a1105eceb84502f0d7fa8cf18d314d6
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
[ftinspect] Add signal for HintingModeComboBox.
Also fix typo `hortizontal' -> `horizontal'.
* src/ftinspect.cpp (MainGUI::checkHintingMode): New function.
(MainGUI::createConnections): Add signal.
* src/ftinspect.h: Updated.
---
ChangeLog | 11 +++++++++++
src/ftinspect.cpp | 28 ++++++++++++++++++++++++++--
src/ftinspect.h | 3 ++-
3 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 920a3ac..97272c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2016-05-01 Werner Lemberg <address@hidden>
+ [ftinspect] Add signal for HintingModeComboBox.
+
+ Also fix typo `hortizontal' -> `horizontal'.
+
+ * src/ftinspect.cpp (MainGUI::checkHintingMode): New function.
+ (MainGUI::createConnections): Add signal.
+
+ * src/ftinspect.h: Updated.
+
+2016-05-01 Werner Lemberg <address@hidden>
+
[ftinspect] Improve combo box setup.
* src/ftinspect.h (MainGUI): New enums `AntiAliasing',
diff --git a/src/ftinspect.cpp b/src/ftinspect.cpp
index 853162a..68937cd 100644
--- a/src/ftinspect.cpp
+++ b/src/ftinspect.cpp
@@ -62,6 +62,28 @@ MainGUI::about()
}
+void
+MainGUI::checkHintingMode(int index)
+{
+ if (index == HintingMode_AutoHinting)
+ {
+ horizontalHintingCheckBox->setEnabled(true);
+ verticalHintingCheckBox->setEnabled(true);
+ blueZoneHintingCheckBox->setEnabled(true);
+ segmentDrawingCheckBox->setEnabled(true);
+ warpingCheckBox->setEnabled(true);
+ }
+ else
+ {
+ horizontalHintingCheckBox->setEnabled(false);
+ verticalHintingCheckBox->setEnabled(false);
+ blueZoneHintingCheckBox->setEnabled(false);
+ segmentDrawingCheckBox->setEnabled(false);
+ warpingCheckBox->setEnabled(false);
+ }
+}
+
+
// XXX distances are specified in pixels,
// making the layout dependent on the output device resolution
void
@@ -85,7 +107,7 @@ MainGUI::createLayout()
tr("Auto-Hinting"));
hintingModeLabel->setBuddy(hintingModeComboBox);
- hortizontalHintingCheckBox = new QCheckBox(tr("Horizontal Hinting"));
+ horizontalHintingCheckBox = new QCheckBox(tr("Horizontal Hinting"));
verticalHintingCheckBox = new QCheckBox(tr("Vertical Hinting"));
blueZoneHintingCheckBox = new QCheckBox(tr("Blue-Zone Hinting"));
segmentDrawingCheckBox = new QCheckBox(tr("Segment Drawing"));
@@ -169,7 +191,7 @@ MainGUI::createLayout()
generalTabLayout = new QVBoxLayout;
generalTabLayout->addLayout(hintingModeLayout);
- generalTabLayout->addWidget(hortizontalHintingCheckBox);
+ generalTabLayout->addWidget(horizontalHintingCheckBox);
generalTabLayout->addWidget(verticalHintingCheckBox);
generalTabLayout->addWidget(blueZoneHintingCheckBox);
generalTabLayout->addWidget(segmentDrawingCheckBox);
@@ -320,6 +342,8 @@ MainGUI::createLayout()
void
MainGUI::createConnections()
{
+ connect(hintingModeComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(checkHintingMode(int)));
}
diff --git a/src/ftinspect.h b/src/ftinspect.h
index e109fe9..339f59e 100644
--- a/src/ftinspect.h
+++ b/src/ftinspect.h
@@ -43,6 +43,7 @@ protected:
private slots:
void about();
+ void checkHintingMode(int);
private:
QAction *aboutAct;
@@ -50,7 +51,7 @@ private:
QAction *exitAct;
QCheckBox *blueZoneHintingCheckBox;
- QCheckBox *hortizontalHintingCheckBox;
+ QCheckBox *horizontalHintingCheckBox;
QCheckBox *segmentDrawingCheckBox;
QCheckBox *showBitmapsCheckBox;
QCheckBox *showOutlinesCheckBox;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master ec2ce48 1/7: [ftinspect] Add signal for HintingModeComboBox.,
Werner LEMBERG <=