r16313 by fschmid - Completed the edit mode for spirals. Flipping the spiral works now too.
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 28 17:19:49 CET 2011
Author: fschmid
Date: Fri Jan 28 16:19:49 2011
New Revision: 16313
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16313
Log:
Completed the edit mode for spirals. Flipping the spiral works now too.
Modified:
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/canvas.h
trunk/Scribus/scribus/canvasmode_editspiral.cpp
trunk/Scribus/scribus/canvasmode_editspiral.h
trunk/Scribus/scribus/pageitem_spiral.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/ui/spiralvectorbase.ui
trunk/Scribus/scribus/ui/spiralvectordialog.cpp
trunk/Scribus/scribus/ui/spiralvectordialog.h
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Fri Jan 28 16:19:49 2011
@@ -2170,6 +2170,13 @@
QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(r, SC_DEGREES, true, true)), this);
}
+void Canvas::displayRealRotHUD(QPoint m, double rot)
+{
+ if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+ return;
+ QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(rot, SC_DEGREES, true, true)), this);
+}
+
void Canvas::setupEditHRuler(PageItem * item, bool forceAndReset)
{
static QString rulerItemRef;
Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h (original)
+++ trunk/Scribus/scribus/canvas.h Fri Jan 28 16:19:49 2011
@@ -196,6 +196,7 @@
void displayXYHUD(QPoint m, double x, double y);
void displaySizeHUD(QPoint m, double x, double y, bool isLine = false);
void displayRotHUD(QPoint m, double rot);
+ void displayRealRotHUD(QPoint m, double rot);
void setupEditHRuler(PageItem * item, bool forceAndReset = false);
Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp Fri Jan 28 16:19:49 2011
@@ -24,40 +24,24 @@
#include "canvasmode_editspiral.h"
#include <QApplication>
-#include <QButtonGroup>
-#include <QCheckBox>
#include <QCursor>
#include <QEvent>
-#include <QMessageBox>
#include <QMouseEvent>
#include <QPainterPath>
#include <QPoint>
#include <QRect>
#include <QTimer>
#include <QWidgetAction>
-#include <QDebug>
-
-#include "ui/aligndistribute.h"
+
#include "canvas.h"
-#include "ui/contextmenu.h"
#include "fpoint.h"
-#include "fpointarray.h"
-#include "hyphenator.h"
#include "pageitem_spiral.h"
-#include "ui/pageselector.h"
-#include "prefscontext.h"
-#include "prefsfile.h"
-#include "prefsmanager.h"
#include "ui/propertiespalette.h"
#include "scribus.h"
#include "scribusdoc.h"
#include "scribusview.h"
-#include "scribusXml.h"
#include "selection.h"
-#include "undomanager.h"
-#include "units.h"
#include "util.h"
-#include "util_icon.h"
#include "util_math.h"
CanvasMode_EditSpiral::CanvasMode_EditSpiral(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW)
@@ -92,13 +76,10 @@
void CanvasMode_EditSpiral::drawControlsSpiral(QPainter* psx, PageItem* currItem)
{
- QPen p1b = QPen(Qt::blue, 1.0 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
- QPen p1bd = QPen(Qt::blue, 1.0 / m_canvas->m_viewMode.scale, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
QPen p8b = QPen(Qt::blue, 8.0 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
QPen p8r = QPen(Qt::red, 8.0 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
psx->translate(static_cast<int>(currItem->xPos()), static_cast<int>(currItem->yPos()));
psx->rotate(currItem->rotation());
- psx->setPen(p1b);
psx->setBrush(Qt::NoBrush);
psx->setPen(p8b);
if (m_arcPoint == useControlStart)
@@ -141,19 +122,18 @@
Mxp = Myp = -1;
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral* item = currItem->asSpiral();
-// centerPoint = currItem->PoLine.pointQF(0);
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
startAngle = item->spiralStartAngle;
endAngle = item->spiralEndAngle;
- VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
+ VectorDialog->setValues(startAngle, endAngle, item->spiralFactor);
VectorDialog->show();
setModeCursor();
if (fromGesture)
{
m_view->update();
}
- connect(VectorDialog, SIGNAL(NewVectors(double, double, double, double, double)), this, SLOT(applyValues(double, double, double, double, double)));
+ connect(VectorDialog, SIGNAL(NewVectors(double, double, double)), this, SLOT(applyValues(double, double, double)));
connect(VectorDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
connect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
connect(m_doc, SIGNAL(updateEditItem()), this, SLOT(updateFromItem()));
@@ -164,12 +144,11 @@
{
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral* item = currItem->asSpiral();
- centerPoint = currItem->PoLine.pointQF(0);
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
startAngle = item->spiralStartAngle;
endAngle = item->spiralEndAngle;
- VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
+ VectorDialog->setValues(startAngle, endAngle, item->spiralFactor);
m_view->update();
}
@@ -219,46 +198,37 @@
return ret;
}
-void CanvasMode_EditSpiral::applyValues(double start, double end, double height, double width, double factor)
+double CanvasMode_EditSpiral::computeRealAngle(double angle)
+{
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
+ double ret = angle;
+ int rev = static_cast<int>(angle / 360.0);
+ double part = angle - (rev * 360);
+ QTransform bb;
+ bb.scale(currItem->width() / currItem->height(), 1.0);
+ QLineF inp = QLineF(QPointF(currItem->width() / 2.0, currItem->height() / 2.0), QPointF(currItem->width(), currItem->height() / 2.0));
+ inp.setAngle(part);
+ QLineF res = bb.map(inp);
+ ret = res.angle();
+ ret += rev * 360;
+ return ret;
+}
+
+void CanvasMode_EditSpiral::applyValues(double start, double end, double factor)
{
PageItem *currItem = m_doc->m_Selection->itemAt(0);
PageItem_Spiral *item = currItem->asSpiral();
QPointF mPoint = item->PoLine.pointQF(0);
QRectF upRect = QRectF(QPointF(0, 0), QPointF(currItem->width(), currItem->height())).normalized();
-// QRectF upRect2 = QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight);
-// upRect = upRect2.united(upRect);
upRect.translate(currItem->xPos(), currItem->yPos());
- item->spiralStartAngle = start;
- item->spiralEndAngle = end;
+ item->spiralStartAngle = computeRealAngle(start);
+ item->spiralEndAngle = computeRealAngle(end);
item->spiralFactor = factor;
-/* QTransform bb;
- bb.scale(item->spiralHeight / item->spiralWidth, 1.0);
- QLineF inp = QLineF(QPointF(width / 2.0, height / 2.0), QPointF(width, height / 2.0));
- inp.setAngle(start);
- QLineF res = bb.map(inp);
- inp.setAngle(end);
- QLineF ena = bb.map(inp);
- startAngle = res.angle();
- endAngle = ena.angle();
- double nSweep = endAngle - startAngle;
- if (nSweep < 0)
- nSweep += 360;
- QPainterPath pp;
- pp.moveTo(mPoint);
- pp.arcTo(QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight), startAngle, nSweep);
- pp.closeSubpath();
- currItem->PoLine.fromQPainterPath(pp); */
- item->setWidthHeight(width, height);
item->recalcPath();
-// item->arcStartAngle = startAngle;
-// item->arcSweepAngle = endAngle - startAngle;
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
startAngle = item->spiralStartAngle;
endAngle = item->spiralEndAngle;
-// centerPoint = currItem->PoLine.pointQF(0);
-// widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
-// heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
m_doc->regionsChanged()->update(upRect.adjusted(-10.0 - currItem->width() / 2.0, -10.0 - currItem->height() / 2.0, 10.0 + currItem->width() / 2.0, 10.0 + currItem->height() / 2.0));
}
@@ -308,6 +278,10 @@
deltaAngle = deltaAngle + 360;
else if (deltaAngle > 180)
deltaAngle = deltaAngle - 360;
+ if (currItem->imageFlippedV())
+ deltaAngle *= -1.0;
+ if (currItem->imageFlippedH())
+ deltaAngle *= -1.0;
if (m_arcPoint == useControlStart)
{
if (startAngle + deltaAngle >= 0)
@@ -316,8 +290,9 @@
item->spiralStartAngle = startAngle;
item->recalcPath();
startPoint = currItem->PoLine.pointQF(0);
+ m_canvas->displayRealRotHUD(m->globalPos(), startAngle);
}
- VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
+ VectorDialog->setValues(startAngle, endAngle, item->spiralFactor);
}
else if (m_arcPoint == useControlEnd)
{
@@ -327,8 +302,9 @@
item->spiralEndAngle = endAngle;
item->recalcPath();
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
+ m_canvas->displayRealRotHUD(m->globalPos(), endAngle);
}
- VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
+ VectorDialog->setValues(startAngle, endAngle, item->spiralFactor);
}
currItem->update();
QRectF upRect;
Modified: trunk/Scribus/scribus/canvasmode_editspiral.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/canvasmode_editspiral.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.h (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.h Fri Jan 28 16:19:49 2011
@@ -66,6 +66,7 @@
inline bool GetItem(PageItem** pi);
QPointF getSegment(double angle);
+ double computeRealAngle(double angle);
double Mxp, Myp;
ScribusMainWindow* m_ScMW;
@@ -73,9 +74,6 @@
bool m_lastPosWasOverGuide;
QPointF startPoint;
QPointF endPoint;
- QPointF centerPoint;
- QPointF widthPoint;
- QPointF heightPoint;
double startAngle;
double endAngle;
eSpiralPoint m_arcPoint;
@@ -87,7 +85,7 @@
private slots:
void endEditing(bool active);
void endEditing();
- void applyValues(double start, double end, double height, double width, double factor);
+ void applyValues(double start, double end, double factor);
};
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Fri Jan 28 16:19:49 2011
@@ -315,6 +315,23 @@
spanAngle = 180.0;
}
PoLine.fromQPainterPath(path);
+ if (imageFlippedV() || imageFlippedH())
+ {
+ if (imageFlippedV())
+ {
+ QTransform ma;
+ ma.scale(1, -1);
+ PoLine.map(ma);
+ PoLine.translate(0, height());
+ }
+ if (imageFlippedH())
+ {
+ QTransform ma;
+ ma.scale(-1, 1);
+ PoLine.map(ma);
+ PoLine.translate(width(), 0);
+ }
+ }
Clip = FlattenPath(PoLine, Segments);
}
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Jan 28 16:19:49 2011
@@ -8273,7 +8273,7 @@
currItem->moveBy(ix-ix2, iy-iy2, true);
currItem->setRedrawBounding();
}
- if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+ if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
currItem->flipImageH();
if (currItem->itemType() != PageItem::Line)
MirrorPolyH(currItem);
@@ -8302,6 +8302,8 @@
ar->recalcPath();
emit updateEditItem();
}
+ else if (currItem->isSpiral())
+ emit updateEditItem();
currItem->setRedrawBounding();
}
trans.commit();
@@ -8311,7 +8313,7 @@
for (uint a = 0; a < docSelectionCount; ++a)
{
PageItem* currItem=m_Selection->itemAt(a);
- if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+ if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
currItem->flipImageH();
if (currItem->itemType() != PageItem::Line)
MirrorPolyH(currItem);
@@ -8349,6 +8351,8 @@
ar->recalcPath();
emit updateEditItem();
}
+ else if (currItem->isSpiral())
+ emit updateEditItem();
}
}
regionsChanged()->update(QRectF());
@@ -8381,7 +8385,7 @@
currItem->moveBy(ix-ix2, iy-iy2, true);
currItem->setRedrawBounding();
}
- if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+ if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
currItem->flipImageV();
if (currItem->itemType() != PageItem::Line)
MirrorPolyV(currItem);
@@ -8412,6 +8416,8 @@
ar->recalcPath();
emit updateEditItem();
}
+ else if (currItem->isSpiral())
+ emit updateEditItem();
currItem->setRedrawBounding();
}
regionsChanged()->update(QRectF());
@@ -8422,7 +8428,7 @@
for (uint a = 0; a < docSelectionCount; ++a)
{
PageItem* currItem=m_Selection->itemAt(a);
- if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+ if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
currItem->flipImageV();
if (currItem->itemType() != PageItem::Line)
MirrorPolyV(currItem);
@@ -8462,6 +8468,8 @@
ar->recalcPath();
emit updateEditItem();
}
+ else if (currItem->isSpiral())
+ emit updateEditItem();
}
regionsChanged()->update(QRectF());
}
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Fri Jan 28 16:19:49 2011
@@ -1759,7 +1759,7 @@
setXY(i->xPos(), i->yPos());
setBH(i->width(), i->height());
NoPrint->setChecked(!i->printEnabled());
- if (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup())
+ if (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup() || i->isSpiral())
{
FlipH->setCheckable(true);
FlipV->setCheckable(true);
@@ -2127,7 +2127,7 @@
//It then gets reset below for items where its valid
FlipH->setCheckable(true);
FlipV->setCheckable(true);
- if ((nr == 2) || (nr == 4) || ((nr >= 9) && (nr <= 12)))
+ if ((nr == 2) || (nr == 4) || ((nr >= 9) && (nr <= 12)) || (nr == 15))
{
FlipH->setCheckable(true);
FlipV->setCheckable(true);
Modified: trunk/Scribus/scribus/ui/spiralvectorbase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/ui/spiralvectorbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/spiralvectorbase.ui (original)
+++ trunk/Scribus/scribus/ui/spiralvectorbase.ui Fri Jan 28 16:19:49 2011
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>149</width>
- <height>175</height>
+ <width>139</width>
+ <height>119</height>
</rect>
</property>
<property name="minimumSize">
@@ -66,47 +66,13 @@
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Height:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="ScrSpinBox" name="arcHeight">
- <property name="decimals">
- <number>1</number>
- </property>
- <property name="maximum">
- <double>99999.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Width:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="ScrSpinBox" name="arcWidth">
- <property name="decimals">
- <number>1</number>
- </property>
- <property name="maximum">
- <double>99999.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Factor:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="2" column="1">
<widget class="QSpinBox" name="arcFactor">
<property name="suffix">
<string> %</string>
Modified: trunk/Scribus/scribus/ui/spiralvectordialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/ui/spiralvectordialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/spiralvectordialog.cpp (original)
+++ trunk/Scribus/scribus/ui/spiralvectordialog.cpp Fri Jan 28 16:19:49 2011
@@ -32,8 +32,6 @@
sweepAngle->setValues(0, 36000, 1, 0);
connect(startAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
connect(sweepAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- connect(arcHeight, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- connect(arcWidth, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
connect(arcFactor, SIGNAL(valueChanged(int)), this, SLOT(changeVectors()));
connect(exitButton, SIGNAL(clicked()), this, SIGNAL(endEdit()));
languageChange();
@@ -56,24 +54,18 @@
resize(minimumSizeHint());
}
-void SpiralVectorDialog::setValues(double start, double sweep, double height, double width, double factor)
+void SpiralVectorDialog::setValues(double start, double sweep, double factor)
{
disconnect(startAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
disconnect(sweepAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- disconnect(arcHeight, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- disconnect(arcWidth, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
disconnect(arcFactor, SIGNAL(valueChanged(int)), this, SLOT(changeVectors()));
startAngle->setValue(start);
sweepAngle->setValue(sweep);
- arcHeight->setValue(height);
- arcWidth->setValue(width);
startAngle->setMaximum(sweep - 1);
sweepAngle->setMinimum(start + 1);
arcFactor->setValue(qRound(factor * 100) - 100);
connect(startAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
connect(sweepAngle, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- connect(arcHeight, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- connect(arcWidth, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
connect(arcFactor, SIGNAL(valueChanged(int)), this, SLOT(changeVectors()));
}
@@ -81,15 +73,5 @@
{
startAngle->setMaximum(sweepAngle->value() - 1);
sweepAngle->setMinimum(startAngle->value() + 1);
- emit NewVectors(startAngle->value(), sweepAngle->value(), arcHeight->value(), arcWidth->value(), (arcFactor->value() + 100) / 100.0);
+ emit NewVectors(startAngle->value(), sweepAngle->value(), (arcFactor->value() + 100) / 100.0);
}
-
-void SpiralVectorDialog::unitChange(int unitIndex)
-{
- disconnect(arcHeight, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- disconnect(arcWidth, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- arcHeight->setNewUnit(unitIndex);
- arcWidth->setNewUnit(unitIndex);
- connect(arcHeight, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
- connect(arcWidth, SIGNAL(valueChanged(double)), this, SLOT(changeVectors()));
-}
Modified: trunk/Scribus/scribus/ui/spiralvectordialog.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16313&path=/trunk/Scribus/scribus/ui/spiralvectordialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/spiralvectordialog.h (original)
+++ trunk/Scribus/scribus/ui/spiralvectordialog.h Fri Jan 28 16:19:49 2011
@@ -49,11 +49,10 @@
public slots:
void languageChange();
void changeVectors();
- void setValues(double start, double sweep, double height, double width, double factor);
- void unitChange(int unitIndex);
+ void setValues(double start, double sweep, double factor);
signals:
- void NewVectors(double, double, double, double, double);
+ void NewVectors(double, double, double);
void endEdit();
};
More information about the scribus-commit
mailing list