#include <vabstractapplication.h>
Public Member Functions | |
VAbstractApplication (int &argc, char **argv) | |
virtual | ~VAbstractApplication () Q_DECL_OVERRIDE |
virtual const VTranslateVars * | TrVars ()=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 Unit * | patternUnitP () const |
void | setPatternUnit (const Unit &patternUnit) |
MeasurementsType | patternType () const |
void | setPatternType (const MeasurementsType &patternType) |
virtual void | OpenSettings ()=0 |
VCommonSettings * | Settings () |
getSettings hide settings constructor. More... | |
template<typename T > | |
QString | LocaleToString (const T &value) |
QGraphicsScene * | getCurrentScene () const |
void | setCurrentScene (QGraphicsScene **value) |
VMainGraphicsView * | getSceneView () const |
void | setSceneView (VMainGraphicsView *value) |
double | toPixel (double val) const |
double | fromPixel (double pix) const |
void | setCurrentDocument (VAbstractPattern *doc) |
VAbstractPattern * | getCurrentDocument () const |
void | setCurrentData (VContainer *data) |
VContainer * | getCurrentData () 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... | |
VCommonSettings * | settings |
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 |
VMainGraphicsView * | sceneView |
VAbstractPattern * | doc |
VContainer * | data |
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... | |
Definition at line 85 of file vabstractapplication.h.
VAbstractApplication::VAbstractApplication | ( | int & | argc, |
char ** | argv | ||
) |
Definition at line 68 of file vabstractapplication.cpp.
References Cm, Settings(), and Unknown.
|
virtual |
Definition at line 116 of file vabstractapplication.cpp.
|
private |
Definition at line 307 of file vabstractapplication.cpp.
References appTranslator, pmsTranslator, qtBaseTranslator, qtTranslator, and qtxmlTranslator.
Referenced by loadTranslations().
double VAbstractApplication::fromPixel | ( | double | pix | ) | const |
Definition at line 261 of file vabstractapplication.cpp.
References _patternUnit, and FromPixel().
VContainer * VAbstractApplication::getCurrentData | ( | ) | const |
Definition at line 163 of file vabstractapplication.cpp.
VAbstractPattern * VAbstractApplication::getCurrentDocument | ( | ) | const |
Definition at line 150 of file vabstractapplication.cpp.
QGraphicsScene * VAbstractApplication::getCurrentScene | ( | ) | const |
Definition at line 230 of file vabstractapplication.cpp.
References currentScene, and SCASSERT.
|
inline |
Definition at line 183 of file vabstractapplication.h.
References patternFilePath.
QWidget * VAbstractApplication::getMainWindow | ( | ) | const |
Definition at line 182 of file vabstractapplication.cpp.
References mainWindow.
bool VAbstractApplication::getOpeningPattern | ( | ) | const |
Definition at line 170 of file vabstractapplication.cpp.
References openingPattern.
VMainGraphicsView * VAbstractApplication::getSceneView | ( | ) | const |
Definition at line 243 of file vabstractapplication.cpp.
References sceneView.
QUndoStack * VAbstractApplication::getUndoStack | ( | ) | const |
Definition at line 195 of file vabstractapplication.cpp.
References undoStack.
|
protectedpure virtual |
Implemented in MApplication, and VApplication.
Referenced by loadTranslations().
|
pure virtual |
Implemented in MApplication, and VApplication.
void VAbstractApplication::loadTranslations | ( | const QString & | locale | ) |
Definition at line 267 of file vabstractapplication.cpp.
References appTranslator, ClearTranslation(), InitTrVars(), pmsTranslator, qtBaseTranslator, qtTranslator, qtxmlTranslator, and translationsPath().
Referenced by VApplication::InitOptions(), MApplication::InitOptions(), MApplication::ParseCommandLine(), and VApplication::VApplication().
|
inline |
Definition at line 196 of file vabstractapplication.h.
References qApp.
|
pure virtual |
Implemented in MApplication, and VApplication.
MeasurementsType VAbstractApplication::patternType | ( | ) | const |
Definition at line 132 of file vabstractapplication.cpp.
References _patternType.
Referenced by setPatternType().
Unit VAbstractApplication::patternUnit | ( | ) | const |
Definition at line 201 of file vabstractapplication.cpp.
References _patternUnit.
Referenced by setPatternUnit().
const Unit * VAbstractApplication::patternUnitP | ( | ) | const |
Definition at line 207 of file vabstractapplication.cpp.
References _patternUnit.
void VAbstractApplication::setCurrentData | ( | VContainer * | data | ) |
Definition at line 157 of file vabstractapplication.cpp.
References data.
void VAbstractApplication::setCurrentDocument | ( | VAbstractPattern * | doc | ) |
Definition at line 144 of file vabstractapplication.cpp.
References doc.
void VAbstractApplication::setCurrentScene | ( | QGraphicsScene ** | value | ) |
Definition at line 237 of file vabstractapplication.cpp.
References currentScene.
|
inline |
Definition at line 189 of file vabstractapplication.h.
References patternFilePath.
void VAbstractApplication::setMainWindow | ( | QWidget * | value | ) |
Definition at line 188 of file vabstractapplication.cpp.
References mainWindow, and SCASSERT.
Referenced by main().
void VAbstractApplication::setOpeningPattern | ( | ) |
Definition at line 176 of file vabstractapplication.cpp.
References openingPattern.
void VAbstractApplication::setPatternType | ( | const MeasurementsType & | patternType | ) |
Definition at line 138 of file vabstractapplication.cpp.
References _patternType, and patternType().
void VAbstractApplication::setPatternUnit | ( | const Unit & | patternUnit | ) |
Definition at line 213 of file vabstractapplication.cpp.
References _patternUnit, and patternUnit().
void VAbstractApplication::setSceneView | ( | VMainGraphicsView * | value | ) |
Definition at line 249 of file vabstractapplication.cpp.
References sceneView.
VCommonSettings * VAbstractApplication::Settings | ( | ) |
getSettings hide settings constructor.
Definition at line 223 of file vabstractapplication.cpp.
References SCASSERT, and settings.
Referenced by VAbstractApplication().
double VAbstractApplication::toPixel | ( | double | val | ) | const |
Definition at line 255 of file vabstractapplication.cpp.
References _patternUnit, and ToPixel().
QString VAbstractApplication::translationsPath | ( | const QString & | locale = QString() | ) | const |
translationsPath return path to the root directory that contains QM files.
locale | historic, not used |
Definition at line 125 of file vabstractapplication.cpp.
Referenced by loadTranslations().
|
pure virtual |
Implemented in MApplication, and VApplication.
|
private |
Definition at line 164 of file vabstractapplication.h.
Referenced by patternType(), and setPatternType().
|
private |
Definition at line 163 of file vabstractapplication.h.
Referenced by fromPixel(), patternUnit(), patternUnitP(), setPatternUnit(), and toPixel().
|
protected |
Definition at line 156 of file vabstractapplication.h.
Referenced by ClearTranslation(), and loadTranslations().
|
private |
Definition at line 167 of file vabstractapplication.h.
Referenced by getCurrentScene(), and setCurrentScene().
|
private |
Definition at line 171 of file vabstractapplication.h.
Referenced by getCurrentData(), and setCurrentData().
|
private |
Definition at line 170 of file vabstractapplication.h.
Referenced by getCurrentDocument(), and setCurrentDocument().
|
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().
|
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().
|
private |
Definition at line 165 of file vabstractapplication.h.
Referenced by getFilePath(), and setFilePath().
|
protected |
Definition at line 157 of file vabstractapplication.h.
Referenced by ClearTranslation(), and loadTranslations().
|
protected |
Definition at line 155 of file vabstractapplication.h.
Referenced by ClearTranslation(), and loadTranslations().
|
protected |
Definition at line 153 of file vabstractapplication.h.
Referenced by ClearTranslation(), and loadTranslations().
|
protected |
Definition at line 154 of file vabstractapplication.h.
Referenced by ClearTranslation(), and loadTranslations().
|
private |
Definition at line 168 of file vabstractapplication.h.
Referenced by getSceneView(), and setSceneView().
|
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().
|
protected |
Definition at line 140 of file vabstractapplication.h.
Referenced by getUndoStack(), and VApplication::VApplication().