#include <mapplication.h>
Public Slots | |
void | ProcessCMD () |
Public Member Functions | |
MApplication (int &argc, char **argv) | |
virtual | ~MApplication () Q_DECL_OVERRIDE |
virtual bool | notify (QObject *receiver, QEvent *event) Q_DECL_OVERRIDE |
notify Reimplemented from QApplication::notify(). More... | |
bool | IsTestMode () const |
virtual bool | IsAppInGUIMode () const Q_DECL_OVERRIDE |
IsAppInGUIMode little hack that allow to have access to application state from VAbstractApplication class. More... | |
TMainWindow * | MainWindow () |
QList< TMainWindow * > | MainWindows () |
TMainWindow * | NewMainWindow () |
void | InitOptions () |
virtual const VTranslateVars * | TrVars () Q_DECL_OVERRIDE |
virtual void | OpenSettings () Q_DECL_OVERRIDE |
VSeamlyMeSettings * | SeamlyMeSettings () |
void | ShowDataBase () |
void | retranslateGroups () |
void | RetranslateTables () |
void | ParseCommandLine (const SocketConnection &connection, const QStringList &arguments) |
Public Member Functions inherited from VAbstractApplication | |
VAbstractApplication (int &argc, char **argv) | |
virtual | ~VAbstractApplication () Q_DECL_OVERRIDE |
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) |
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 |
QString | getFilePath () const |
void | setFilePath (const QString &value) |
Protected Member Functions | |
virtual void | InitTrVars () Q_DECL_OVERRIDE |
virtual bool | event (QEvent *e) Q_DECL_OVERRIDE |
Private Slots | |
void | NewLocalSocketConnection () |
Private Member Functions | |
void | Clean () |
Private Attributes | |
QList< QPointer< TMainWindow > > | mainWindows |
QLocalServer * | localServer |
VTranslateVars * | trVars |
QPointer< MeasurementDatabaseDialog > | dataBase |
bool | testMode |
Additional Inherited Members | |
Protected Attributes inherited from VAbstractApplication | |
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 |
Definition at line 72 of file mapplication.h.
MApplication::MApplication | ( | int & | argc, |
char ** | argv | ||
) |
Definition at line 249 of file mapplication.cpp.
References APP_VERSION_STR, VER_COMPANYDOMAIN_STR, VER_COMPANYNAME_STR, and VER_INTERNALNAME_ME_STR.
|
virtual |
Definition at line 270 of file mapplication.cpp.
References dataBase, mainWindows, and trVars.
|
private |
Definition at line 768 of file mapplication.cpp.
References mainWindows.
Referenced by event(), MainWindow(), and MainWindows().
|
protectedvirtual |
Definition at line 447 of file mapplication.cpp.
References Clean(), TMainWindow::LoadFile(), and MainWindow().
Referenced by notify().
void MApplication::InitOptions | ( | ) |
Definition at line 396 of file mapplication.cpp.
References APP_VERSION_STR, buildCompatibilityString(), VCommonSettings::GetDefPathIndividualMeasurements(), VCommonSettings::GetDefPathLabelTemplate(), VCommonSettings::GetDefPathMultisizeMeasurements(), VCommonSettings::GetDefPathTemplate(), VAbstractApplication::loadTranslations(), noisyFailureMsgHandler(), OpenSettings(), SeamlyMeSettings(), and VAbstractApplication::settings.
Referenced by main().
|
protectedvirtual |
Implements VAbstractApplication.
Definition at line 434 of file mapplication.cpp.
References VTranslateVars::Retranslate(), and trVars.
|
virtual |
IsAppInGUIMode little hack that allow to have access to application state from VAbstractApplication class.
Implements VAbstractApplication.
Definition at line 367 of file mapplication.cpp.
References IsTestMode().
bool MApplication::IsTestMode | ( | ) | const |
Definition at line 358 of file mapplication.cpp.
References testMode.
Referenced by IsAppInGUIMode().
TMainWindow * MApplication::MainWindow | ( | ) |
Definition at line 373 of file mapplication.cpp.
References Clean(), mainWindows, and NewMainWindow().
Referenced by event(), NewLocalSocketConnection(), and ParseCommandLine().
QList< TMainWindow * > MApplication::MainWindows | ( | ) |
Definition at line 384 of file mapplication.cpp.
References Clean(), and mainWindows.
Referenced by RetranslateTables().
|
privateslot |
Definition at line 748 of file mapplication.cpp.
References localServer, MainWindow(), ParseCommandLine(), and Server.
Referenced by ParseCommandLine().
TMainWindow * MApplication::NewMainWindow | ( | ) |
Definition at line 730 of file mapplication.cpp.
References mainWindows, and qApp.
Referenced by MainWindow(), and ParseCommandLine().
|
virtual |
notify Reimplemented from QApplication::notify().
receiver | receiver. |
event | event. |
Definition at line 293 of file mapplication.cpp.
References VExceptionObjectError::DetailedInformation(), VExceptionObjectError::ErrorMessage(), event(), V_EX_DATAERR, V_EX_SOFTWARE, and VException::what().
|
virtual |
Implements VAbstractApplication.
Definition at line 487 of file mapplication.cpp.
References VAbstractApplication::settings.
Referenced by InitOptions().
void MApplication::ParseCommandLine | ( | const SocketConnection & | connection, |
const QStringList & | arguments | ||
) |
Definition at line 536 of file mapplication.cpp.
References Client, Cm, VMeasurement::IsGradationHeightValid(), VMeasurement::IsGradationSizeValid(), VAbstractApplication::loadTranslations(), localServer, LONG_OPTION_NO_HDPI_SCALING, MainWindow(), NewLocalSocketConnection(), NewMainWindow(), qApp, SeamlyMeSettings(), TMainWindow::SetBaseMHeight(), TMainWindow::SetBaseMSize(), TMainWindow::SetPUnit(), StrToUnits(), testMode, unitCM, unitINCH, unitMM, V_EX_OK, V_EX_USAGE, VMeasurement::WholeListHeights(), and VMeasurement::WholeListSizes().
Referenced by NewLocalSocketConnection(), and ProcessCMD().
|
slot |
Definition at line 742 of file mapplication.cpp.
References Client, and ParseCommandLine().
void MApplication::retranslateGroups | ( | ) |
Definition at line 517 of file mapplication.cpp.
References dataBase.
void MApplication::RetranslateTables | ( | ) |
Definition at line 526 of file mapplication.cpp.
References MainWindows().
VSeamlyMeSettings * MApplication::SeamlyMeSettings | ( | ) |
Definition at line 494 of file mapplication.cpp.
References SCASSERT, and VAbstractApplication::settings.
Referenced by InitOptions(), and ParseCommandLine().
void MApplication::ShowDataBase | ( | ) |
Definition at line 501 of file mapplication.cpp.
References dataBase.
|
virtual |
Implements VAbstractApplication.
Definition at line 428 of file mapplication.cpp.
References trVars.
|
private |
Definition at line 116 of file mapplication.h.
Referenced by retranslateGroups(), ShowDataBase(), and ~MApplication().
|
private |
Definition at line 114 of file mapplication.h.
Referenced by NewLocalSocketConnection(), and ParseCommandLine().
|
private |
Definition at line 113 of file mapplication.h.
Referenced by Clean(), MainWindow(), MainWindows(), NewMainWindow(), and ~MApplication().
|
private |
Definition at line 117 of file mapplication.h.
Referenced by IsTestMode(), and ParseCommandLine().
|
private |
Definition at line 115 of file mapplication.h.
Referenced by InitTrVars(), TrVars(), and ~MApplication().