Seamly2D
Code documentation
VAbstractApplication Class Referenceabstract

#include <vabstractapplication.h>

Inheritance diagram for VAbstractApplication:
Collaboration diagram for VAbstractApplication:

Public Member Functions

 VAbstractApplication (int &argc, char **argv)
 
virtual ~VAbstractApplication () Q_DECL_OVERRIDE
 
virtual const VTranslateVarsTrVars ()=0
 
QString translationsPath (const QString &locale=QString()) const
 translationsPath return path to the root directory that contains QM files. More...
 
void loadTranslations (const QString &locale)
 
Unit patternUnit () const
 
const UnitpatternUnitP () const
 
void setPatternUnit (const Unit &patternUnit)
 
MeasurementsType patternType () const
 
void setPatternType (const MeasurementsType &patternType)
 
virtual void OpenSettings ()=0
 
VCommonSettingsSettings ()
 getSettings hide settings constructor. More...
 
template<typename T >
QString LocaleToString (const T &value)
 
QGraphicsScene * getCurrentScene () const
 
void setCurrentScene (QGraphicsScene **value)
 
VMainGraphicsViewgetSceneView () const
 
void setSceneView (VMainGraphicsView *value)
 
double toPixel (double val) const
 
double fromPixel (double pix) const
 
void setCurrentDocument (VAbstractPattern *doc)
 
VAbstractPatterngetCurrentDocument () const
 
void setCurrentData (VContainer *data)
 
VContainergetCurrentData () const
 
bool getOpeningPattern () const
 
void setOpeningPattern ()
 
QWidget * getMainWindow () const
 
void setMainWindow (QWidget *value)
 
QUndoStack * getUndoStack () const
 
virtual bool IsAppInGUIMode () const =0
 
QString getFilePath () const
 
void setFilePath (const QString &value)
 

Protected Member Functions

virtual void InitTrVars ()=0
 

Protected Attributes

QUndoStack * undoStack
 
QWidget * mainWindow
 mainWindow pointer to main window. Usefull if need create modal dialog. Without pointer to main window modality doesn't work. More...
 
VCommonSettingssettings
 settings pointer to settings. Help hide constructor creation settings. Make make code more readable. More...
 
QPointer< QTranslator > qtTranslator
 
QPointer< QTranslator > qtxmlTranslator
 
QPointer< QTranslator > qtBaseTranslator
 
QPointer< QTranslator > appTranslator
 
QPointer< QTranslator > pmsTranslator
 

Private Member Functions

void ClearTranslation ()
 

Private Attributes

Unit _patternUnit
 
MeasurementsType _patternType
 
QString patternFilePath
 
QGraphicsScene ** currentScene
 
VMainGraphicsViewsceneView
 
VAbstractPatterndoc
 
VContainerdata
 
bool openingPattern
 openingPattern true when we opening pattern. If something will be wrong in formula this help understand if we can allow user use Undo option. More...
 

Detailed Description

Definition at line 85 of file vabstractapplication.h.

Constructor & Destructor Documentation

◆ VAbstractApplication()

VAbstractApplication::VAbstractApplication ( int &  argc,
char **  argv 
)

Definition at line 68 of file vabstractapplication.cpp.

References Cm, Settings(), and Unknown.

◆ ~VAbstractApplication()

VAbstractApplication::~VAbstractApplication ( )
virtual

Definition at line 116 of file vabstractapplication.cpp.

Member Function Documentation

◆ ClearTranslation()

void VAbstractApplication::ClearTranslation ( )
private

◆ fromPixel()

double VAbstractApplication::fromPixel ( double  pix) const

Definition at line 261 of file vabstractapplication.cpp.

References _patternUnit, and FromPixel().

◆ getCurrentData()

VContainer * VAbstractApplication::getCurrentData ( ) const

Definition at line 163 of file vabstractapplication.cpp.

References data, and SCASSERT.

◆ getCurrentDocument()

VAbstractPattern * VAbstractApplication::getCurrentDocument ( ) const

Definition at line 150 of file vabstractapplication.cpp.

References doc, and SCASSERT.

◆ getCurrentScene()

QGraphicsScene * VAbstractApplication::getCurrentScene ( ) const

Definition at line 230 of file vabstractapplication.cpp.

References currentScene, and SCASSERT.

◆ getFilePath()

QString VAbstractApplication::getFilePath ( ) const
inline

Definition at line 183 of file vabstractapplication.h.

References patternFilePath.

◆ getMainWindow()

QWidget * VAbstractApplication::getMainWindow ( ) const

Definition at line 182 of file vabstractapplication.cpp.

References mainWindow.

◆ getOpeningPattern()

bool VAbstractApplication::getOpeningPattern ( ) const

Definition at line 170 of file vabstractapplication.cpp.

References openingPattern.

◆ getSceneView()

VMainGraphicsView * VAbstractApplication::getSceneView ( ) const

Definition at line 243 of file vabstractapplication.cpp.

References sceneView.

◆ getUndoStack()

QUndoStack * VAbstractApplication::getUndoStack ( ) const

Definition at line 195 of file vabstractapplication.cpp.

References undoStack.

◆ InitTrVars()

virtual void VAbstractApplication::InitTrVars ( )
protectedpure virtual

Implemented in MApplication, and VApplication.

Referenced by loadTranslations().

◆ IsAppInGUIMode()

virtual bool VAbstractApplication::IsAppInGUIMode ( ) const
pure virtual

Implemented in MApplication, and VApplication.

◆ loadTranslations()

◆ LocaleToString()

template<typename T >
QString VAbstractApplication::LocaleToString ( const T &  value)
inline

Definition at line 196 of file vabstractapplication.h.

References qApp.

◆ OpenSettings()

virtual void VAbstractApplication::OpenSettings ( )
pure virtual

Implemented in MApplication, and VApplication.

◆ patternType()

MeasurementsType VAbstractApplication::patternType ( ) const

Definition at line 132 of file vabstractapplication.cpp.

References _patternType.

Referenced by setPatternType().

◆ patternUnit()

Unit VAbstractApplication::patternUnit ( ) const

Definition at line 201 of file vabstractapplication.cpp.

References _patternUnit.

Referenced by setPatternUnit().

◆ patternUnitP()

const Unit * VAbstractApplication::patternUnitP ( ) const

Definition at line 207 of file vabstractapplication.cpp.

References _patternUnit.

◆ setCurrentData()

void VAbstractApplication::setCurrentData ( VContainer data)

Definition at line 157 of file vabstractapplication.cpp.

References data.

◆ setCurrentDocument()

void VAbstractApplication::setCurrentDocument ( VAbstractPattern doc)

Definition at line 144 of file vabstractapplication.cpp.

References doc.

◆ setCurrentScene()

void VAbstractApplication::setCurrentScene ( QGraphicsScene **  value)

Definition at line 237 of file vabstractapplication.cpp.

References currentScene.

◆ setFilePath()

void VAbstractApplication::setFilePath ( const QString &  value)
inline

Definition at line 189 of file vabstractapplication.h.

References patternFilePath.

◆ setMainWindow()

void VAbstractApplication::setMainWindow ( QWidget *  value)

Definition at line 188 of file vabstractapplication.cpp.

References mainWindow, and SCASSERT.

Referenced by main().

◆ setOpeningPattern()

void VAbstractApplication::setOpeningPattern ( )

Definition at line 176 of file vabstractapplication.cpp.

References openingPattern.

◆ setPatternType()

void VAbstractApplication::setPatternType ( const MeasurementsType patternType)

Definition at line 138 of file vabstractapplication.cpp.

References _patternType, and patternType().

◆ setPatternUnit()

void VAbstractApplication::setPatternUnit ( const Unit patternUnit)

Definition at line 213 of file vabstractapplication.cpp.

References _patternUnit, and patternUnit().

◆ setSceneView()

void VAbstractApplication::setSceneView ( VMainGraphicsView value)

Definition at line 249 of file vabstractapplication.cpp.

References sceneView.

◆ Settings()

VCommonSettings * VAbstractApplication::Settings ( )

getSettings hide settings constructor.

Returns
pointer to class for acssesing to settings in ini file.

Definition at line 223 of file vabstractapplication.cpp.

References SCASSERT, and settings.

Referenced by VAbstractApplication().

◆ toPixel()

double VAbstractApplication::toPixel ( double  val) const

Definition at line 255 of file vabstractapplication.cpp.

References _patternUnit, and ToPixel().

◆ translationsPath()

QString VAbstractApplication::translationsPath ( const QString &  locale = QString()) const

translationsPath return path to the root directory that contains QM files.

Parameters
localehistoric, not used
Returns
path to a directory that contains QM files, default from CONFIG+=embed_translations as set in translations.pri

Definition at line 125 of file vabstractapplication.cpp.

Referenced by loadTranslations().

◆ TrVars()

virtual const VTranslateVars* VAbstractApplication::TrVars ( )
pure virtual

Implemented in MApplication, and VApplication.

Member Data Documentation

◆ _patternType

MeasurementsType VAbstractApplication::_patternType
private

Definition at line 164 of file vabstractapplication.h.

Referenced by patternType(), and setPatternType().

◆ _patternUnit

Unit VAbstractApplication::_patternUnit
private

Definition at line 163 of file vabstractapplication.h.

Referenced by fromPixel(), patternUnit(), patternUnitP(), setPatternUnit(), and toPixel().

◆ appTranslator

QPointer<QTranslator> VAbstractApplication::appTranslator
protected

Definition at line 156 of file vabstractapplication.h.

Referenced by ClearTranslation(), and loadTranslations().

◆ currentScene

QGraphicsScene** VAbstractApplication::currentScene
private

Definition at line 167 of file vabstractapplication.h.

Referenced by getCurrentScene(), and setCurrentScene().

◆ data

VContainer* VAbstractApplication::data
private

Definition at line 171 of file vabstractapplication.h.

Referenced by getCurrentData(), and setCurrentData().

◆ doc

VAbstractPattern* VAbstractApplication::doc
private

Definition at line 170 of file vabstractapplication.h.

Referenced by getCurrentDocument(), and setCurrentDocument().

◆ mainWindow

QWidget* VAbstractApplication::mainWindow
protected

mainWindow pointer to main window. Usefull if need create modal dialog. Without pointer to main window modality doesn't work.

Definition at line 146 of file vabstractapplication.h.

Referenced by VApplication::event(), getMainWindow(), and setMainWindow().

◆ openingPattern

bool VAbstractApplication::openingPattern
private

openingPattern true when we opening pattern. If something will be wrong in formula this help understand if we can allow user use Undo option.

Definition at line 177 of file vabstractapplication.h.

Referenced by getOpeningPattern(), and setOpeningPattern().

◆ patternFilePath

QString VAbstractApplication::patternFilePath
private

Definition at line 165 of file vabstractapplication.h.

Referenced by getFilePath(), and setFilePath().

◆ pmsTranslator

QPointer<QTranslator> VAbstractApplication::pmsTranslator
protected

Definition at line 157 of file vabstractapplication.h.

Referenced by ClearTranslation(), and loadTranslations().

◆ qtBaseTranslator

QPointer<QTranslator> VAbstractApplication::qtBaseTranslator
protected

Definition at line 155 of file vabstractapplication.h.

Referenced by ClearTranslation(), and loadTranslations().

◆ qtTranslator

QPointer<QTranslator> VAbstractApplication::qtTranslator
protected

Definition at line 153 of file vabstractapplication.h.

Referenced by ClearTranslation(), and loadTranslations().

◆ qtxmlTranslator

QPointer<QTranslator> VAbstractApplication::qtxmlTranslator
protected

Definition at line 154 of file vabstractapplication.h.

Referenced by ClearTranslation(), and loadTranslations().

◆ sceneView

VMainGraphicsView* VAbstractApplication::sceneView
private

Definition at line 168 of file vabstractapplication.h.

Referenced by getSceneView(), and setSceneView().

◆ settings

VCommonSettings* VAbstractApplication::settings
protected

settings pointer to settings. Help hide constructor creation settings. Make make code more readable.

Definition at line 151 of file vabstractapplication.h.

Referenced by VApplication::InitOptions(), MApplication::InitOptions(), VApplication::OpenSettings(), MApplication::OpenSettings(), VApplication::Seamly2DSettings(), MApplication::SeamlyMeSettings(), and Settings().

◆ undoStack

QUndoStack* VAbstractApplication::undoStack
protected

Definition at line 140 of file vabstractapplication.h.

Referenced by getUndoStack(), and VApplication::VApplication().


The documentation for this class was generated from the following files: