Fix missing headers, fix for precompiled header on Windows, fix zooming.

--HG--
branch : develop
This commit is contained in:
dismine 2014-07-13 15:49:00 +03:00
parent e670ab0fd8
commit e2ffad7146
14 changed files with 57 additions and 28 deletions

View File

@ -31,6 +31,8 @@
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QStackedWidget>
#include <QCloseEvent>
//---------------------------------------------------------------------------------------------------------------------
ConfigDialog::ConfigDialog(QWidget *parent) :

View File

@ -43,6 +43,7 @@
#include <QTableWidget>
#include <QPushButton>
#include <QFileDialog>
#include <QHeaderView>
//---------------------------------------------------------------------------------------------------------------------
PathPage::PathPage(QWidget *parent)

View File

@ -36,6 +36,7 @@
#include <QCheckBox>
#include <QSpinBox>
#include <QLineEdit>
#include <QVBoxLayout>
//---------------------------------------------------------------------------------------------------------------------
PatternPage::PatternPage(QWidget *parent):

View File

@ -31,6 +31,8 @@
#include "../tools/dialogtool.h"
#include <QDomElement>
class VPattern;
class VToolRecord;

View File

@ -33,6 +33,7 @@
#include <QMessageBox>
#include <QPushButton>
#include <QSettings>
#include <QDesktopWidget>
#include "../../widgets/vapplication.h"
#include "../../container/vcontainer.h"

View File

@ -30,6 +30,7 @@
#include "ui_dialogstandardmeasurements.h"
#include <QDir>
#include <QPushButton>
#include <QDesktopWidget>
#include "../../xml/vstandardmeasurements.h"
#include "../../widgets/vapplication.h"
#include "../../container/vcontainer.h"

View File

@ -47,8 +47,6 @@
#include <QSettings>
#include <QPushButton>
#include <QDoubleSpinBox>
#include <QListWidget>
#include <QRadioButton>
#define DIALOGARC_MAX_FORMULA_HEIGHT 64

View File

@ -31,15 +31,16 @@
#include <QDialog>
#include <QDialogButtonBox>
#include <QLineEdit>
#include <QListWidget>
#include <QRadioButton>
#include "../../widgets/vapplication.h"
#include <QPushButton>
class QDoubleSpinBox;
class QLabel;
class QRadioButton;
class QComboBox;
class QListWidgetItem;
class QListWidget;
class VContainer;
class QPlainTextEdit;
class VAbstractTool;

View File

@ -28,6 +28,8 @@
#include "vabstractcurve.h"
#include <QPainterPath>
//---------------------------------------------------------------------------------------------------------------------
VAbstractCurve::VAbstractCurve(const GOType &type, const quint32 &idObject, const Draw &mode)
:VGObject(type, idObject, mode)

View File

@ -182,6 +182,10 @@ int main(int argc, char *argv[])
parser.addPositionalArgument("filename", QCoreApplication::translate("main", "Pattern file."));
parser.process(app);
const QStringList args = parser.positionalArguments();
//Before we load pattern show window.
w.show();
for(int i=0;i<args.size();++i)
{
if (i == 0)
@ -193,6 +197,6 @@ int main(int argc, char *argv[])
VApplication::NewValentina(args.at(i));
}
}
w.show();
return app.exec();
}

View File

@ -1113,6 +1113,7 @@ void MainWindow::currentDrawChanged( int index )
{
ArrowTool();
view->fitInView(doc->ActiveDrawBoundingRect(), Qt::KeepAspectRatio);
view->NewFactor(view->transform().m11());
}
}
}

View File

@ -40,6 +40,7 @@
#if defined __cplusplus
/* Add C++ includes here */
/*In all cases we need include core header for getting defined values*/
#ifdef QT_CORE_LIB
# include <QtCore>
#endif
@ -48,24 +49,41 @@
# include <QtGui>
#endif
#ifdef QT_WIDGETS_LIB
# include <QtWidgets>
#endif
#ifdef QT_XML_LIB
# include <QtXml>
#endif
#ifdef QT_SVG_LIB
# include <QtSvg/QtSvg>
#endif
//In Windows you can't use same header in all modes.
#if defined(Q_OS_WIN)
# if defined(QT_NO_DEBUG)//release mode
#ifdef QT_PRINTSUPPORT_LIB
# include <QtPrintSupport>
#endif
# ifdef QT_WIDGETS_LIB
# include <QtWidgets>
# endif
//Build doesn't work, if include this headers on Windows.
#ifndef Q_OS_WIN
# ifdef QT_SVG_LIB
# include <QtSvg/QtSvg>
# endif
# ifdef QT_PRINTSUPPORT_LIB
# include <QtPrintSupport>
# endif
# endif/*QT_NO_DEBUG*/
#else
# ifdef QT_WIDGETS_LIB
# include <QtWidgets>
# endif
# ifdef QT_SVG_LIB
# include <QtSvg/QtSvg>
# endif
# ifdef QT_PRINTSUPPORT_LIB
# include <QtPrintSupport>
# endif
//Build doesn't work, if include this headers on Windows.
# ifdef QT_XMLPATTERNS_LIB
# include <QtXmlPatterns>
# endif
@ -73,7 +91,7 @@
# ifdef QT_NETWORK_LIB
# include <QtNetwork>
# endif
#endif /*Q_OS_WIN*/
#endif/*Q_OS_WIN*/
#endif /*__cplusplus*/

View File

@ -117,11 +117,8 @@ void VMainGraphicsView::scrollingTime(qreal x)
}
else
{
// if (verticalScrollBar()->value() > 0)
// {
verticalScrollBar()->setValue(qRound(verticalScrollBar()->value() - factor*3.5));
emit NewFactor(factor);
// }
verticalScrollBar()->setValue(qRound(verticalScrollBar()->value() - factor*3.5));
emit NewFactor(factor);
}
}
@ -180,9 +177,7 @@ void VMainGraphicsView::ZoomFitBest()
}
this->fitInView(rect, Qt::KeepAspectRatio);
VAbstractTool::NewSceneRect(this->scene(), this);
QTransform trans = this->transform();
emit NewFactor(trans.m11());
emit NewFactor(this->transform().m11());
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -43,6 +43,7 @@
#include "../../libs/qmuparser/qmuparsererror.h"
#include "../geometry/varc.h"
#include <QMessageBox>
#include <QUndoStack>
const QString VPattern::TagPattern = QStringLiteral("pattern");
const QString VPattern::TagCalculation = QStringLiteral("calculation");
@ -2005,7 +2006,7 @@ QRectF VPattern::ActiveDrawBoundingRect() const
template <typename T>
QRectF VPattern::ToolBoundingRect(const QRectF &rec, const quint32 &id) const
{
QRectF recTool = recTool.united(rec);
QRectF recTool = rec;
if (tools.contains(id))
{
T *vTool = qobject_cast<T *>(tools.value(id));
@ -2015,7 +2016,8 @@ QRectF VPattern::ToolBoundingRect(const QRectF &rec, const quint32 &id) const
//map to scene coordinate.
childrenRect.translate(vTool->scenePos());
recTool = recTool | vTool->boundingRect() | childrenRect;
recTool = recTool.united(vTool->boundingRect());
recTool = recTool.united(childrenRect);
}
else
{