--HG--
branch : develop
This commit is contained in:
dismine 2014-01-27 18:01:24 +02:00
parent 11b5c00c89
commit cf2f076346
21 changed files with 52 additions and 50 deletions

View File

@ -111,4 +111,3 @@ void DialogCutArc::setPointName(const QString &value)
pointName = value; pointName = value;
ui->lineEditNamePoint->setText(pointName); ui->lineEditNamePoint->setText(pointName);
} }

View File

@ -31,7 +31,8 @@
#include "dialogtool.h" #include "dialogtool.h"
namespace Ui { namespace Ui
{
class DialogCutArc; class DialogCutArc;
} }

View File

@ -135,8 +135,7 @@ QVector<QPointF> VArc::GetPoints() const
line.setAngle(line.angle()+angle); line.setAngle(line.angle()+angle);
points.append(line.p2()); points.append(line.p2());
} }
} } while (i <= angle);
while(i <= angle);
return points; return points;
} }

View File

@ -212,4 +212,3 @@ void VSplinePath::setMaxCountPoints(const qint32 &value)
{ {
maxCountPoints = value; maxCountPoints = value;
} }

View File

@ -93,7 +93,8 @@ MainWindow::MainWindow(QWidget *parent)
{ {
ui->setupUi(this); ui->setupUi(this);
static const char * GENERIC_ICON_TO_CHECK = "document-open"; static const char * GENERIC_ICON_TO_CHECK = "document-open";
if (!QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK)) { if (QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK) == false)
{
//If there is no default working icon theme then we should //If there is no default working icon theme then we should
//use an icon theme that we provide via a .qrc file //use an icon theme that we provide via a .qrc file
//This case happens under Windows and Mac OS X //This case happens under Windows and Mac OS X
@ -1263,14 +1264,14 @@ bool MainWindow::ValidatePattern(const QString &schema, const QString &fileName,
sch.load(&fileSchema, QUrl::fromLocalFile(fileSchema.fileName())); sch.load(&fileSchema, QUrl::fromLocalFile(fileSchema.fileName()));
bool errorOccurred = false; bool errorOccurred = false;
if (!sch.isValid()) if (sch.isValid() == false)
{ {
errorOccurred = true; errorOccurred = true;
} }
else else
{ {
QXmlSchemaValidator validator(sch); QXmlSchemaValidator validator(sch);
if (!validator.validate(&pattern, QUrl::fromLocalFile(pattern.fileName()))) if (validator.validate(&pattern, QUrl::fromLocalFile(pattern.fileName())) == false)
{ {
errorOccurred = true; errorOccurred = true;
} }

View File

@ -174,8 +174,10 @@ void TableWindow::saveScene()
i.next(); i.next();
saveMessage += i.key(); saveMessage += i.key();
if (i.hasNext()) if (i.hasNext())
{
saveMessage += ";;"; saveMessage += ";;";
} }
}
QString sf; QString sf;
// the save function // the save function
@ -446,7 +448,8 @@ void TableWindow::PdfFile(const QString &name) const
printer.setResolution(PrintDPI); printer.setResolution(PrintDPI);
printer.setPaperSize ( QSizeF(toMM(w), toMM(h)), QPrinter::Millimeter ); printer.setPaperSize ( QSizeF(toMM(w), toMM(h)), QPrinter::Millimeter );
QPainter painter; QPainter painter;
if (! painter.begin( &printer )) { // failed to open file if (painter.begin( &printer ) == false)
{ // failed to open file
qCritical("Can't open printer %s", qPrintable(name)); qCritical("Can't open printer %s", qPrintable(name));
return; return;
} }

View File

@ -95,8 +95,8 @@ signals:
* @param controlPoint new position control point. * @param controlPoint new position control point.
* @param splinePoint new position spline point. * @param splinePoint new position spline point.
*/ */
void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &splinePoint ); const QPointF &controlPoint, const QPointF &splinePoint );
/** /**
* @brief setEnabledPoint disable control points. * @brief setEnabledPoint disable control points.
* @param enable enable or diasable points. * @param enable enable or diasable points.