52 #ifndef VABSTRACTAPPLICATION_H
53 #define VABSTRACTAPPLICATION_H
55 #include <qcompilerdetection.h>
56 #include <QApplication>
57 #include <QCoreApplication>
58 #include <QGraphicsScene>
60 #include <QMetaObject>
66 #include "../vmisc/def.h"
67 #include "../vpatterndb/vcontainer.h"
68 #include "../vpatterndb/vtranslatevars.h"
83 #define qApp (static_cast<VAbstractApplication*>(QCoreApplication::instance()))
108 template <
typename T>
117 double toPixel(
double val)
const;
195 template <
typename T>
199 qApp->Settings()->GetOsSeparator() ? loc = QLocale() : loc = QLocale::c();
200 return loc.toString(value);
QWidget * mainWindow
mainWindow pointer to main window. Usefull if need create modal dialog. Without pointer to main windo...
bool openingPattern
openingPattern true when we opening pattern. If something will be wrong in formula this help understa...
void setCurrentDocument(VAbstractPattern *doc)
QPointer< QTranslator > qtBaseTranslator
void setMainWindow(QWidget *value)
const Unit * patternUnitP() const
VMainGraphicsView * sceneView
void setPatternUnit(const Unit &patternUnit)
MeasurementsType _patternType
void setCurrentScene(QGraphicsScene **value)
virtual ~VAbstractApplication() Q_DECL_OVERRIDE
QWidget * getMainWindow() const
virtual bool IsAppInGUIMode() const =0
double fromPixel(double pix) const
VCommonSettings * settings
settings pointer to settings. Help hide constructor creation settings. Make make code more readable.
QGraphicsScene ** currentScene
bool getOpeningPattern() const
QPointer< QTranslator > pmsTranslator
QUndoStack * getUndoStack() const
QString LocaleToString(const T &value)
VContainer * getCurrentData() const
QPointer< QTranslator > appTranslator
virtual void InitTrVars()=0
QPointer< QTranslator > qtTranslator
QString translationsPath(const QString &locale=QString()) const
translationsPath return path to the root directory that contains QM files.
QPointer< QTranslator > qtxmlTranslator
double toPixel(double val) const
void loadTranslations(const QString &locale)
VCommonSettings * Settings()
getSettings hide settings constructor.
MeasurementsType patternType() const
void setPatternType(const MeasurementsType &patternType)
virtual const VTranslateVars * TrVars()=0
void setFilePath(const QString &value)
QString getFilePath() const
VMainGraphicsView * getSceneView() const
VAbstractPattern * getCurrentDocument() const
void setSceneView(VMainGraphicsView *value)
void setCurrentData(VContainer *data)
QGraphicsScene * getCurrentScene() const
virtual void OpenSettings()=0
VAbstractApplication(int &argc, char **argv)
The VContainer class container of all variables.
The VMainGraphicsView class main scene view.