From 0df744b754dacb15377a9c38f3a4b21c605d448c Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 13 Sep 2007 08:46:23 +0000 Subject: [PATCH] *** empty log message *** --- src/LogWindow/LogWindow.pro | 7 ++++--- src/PyConsole/PyConsole.pro | 7 ++++--- src/PyInterp/PyInterp.pro | 5 +++-- src/Qtx/Qtx.pro | 5 +++-- src/Qtx/QtxPreferenceMgr.cxx | 32 +++++++++++++++++++++++++++----- src/Qtx/QtxPreferenceMgr.h | 4 ++++ src/STD/STD.pro | 7 ++++--- src/SUIT/SUIT.pro | 7 ++++--- src/SUITApp/SUITApp.pro | 7 ++++--- 9 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/LogWindow/LogWindow.pro b/src/LogWindow/LogWindow.pro index 40ec097b8..9365764c7 100644 --- a/src/LogWindow/LogWindow.pro +++ b/src/LogWindow/LogWindow.pro @@ -1,11 +1,12 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH = ../../include win32:LIBS += ../../lib/suit.lib ../../lib/qtx.lib -unix:LIBS += -L../../lib -lSUIT -lQtx +unix:LIBS += -L../../$(CONFIG_ID)/lib -lSUIT -lQtx CONFIG -= debug release debug_and_release CONFIG += qt thread debug dll shared diff --git a/src/PyConsole/PyConsole.pro b/src/PyConsole/PyConsole.pro index d5b0cda93..527d9b8c7 100644 --- a/src/PyConsole/PyConsole.pro +++ b/src/PyConsole/PyConsole.pro @@ -1,10 +1,11 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH += ../../include $$(PYTHONINC) -unix:LIBS += -L../../lib -L$$(PYTHONLIB) -lpython2.3 -lSUIT -lPyInterp +unix:LIBS += -L../../$(CONFIG_ID)/lib -L$$(PYTHONLIB) -lpython2.3 -lSUIT -lPyInterp win32:LIBS += /LIBPATH:$$(PYTHONLIB) ../../lib/pyinterp.lib ../../lib/suit.lib CONFIG -= debug release debug_and_release diff --git a/src/PyInterp/PyInterp.pro b/src/PyInterp/PyInterp.pro index 95781fccd..50bb6a9f3 100644 --- a/src/PyInterp/PyInterp.pro +++ b/src/PyInterp/PyInterp.pro @@ -1,7 +1,8 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH += ../../include $$(PYTHONINC) unix:LIBS += -L$$(PYTHONLIB) -lpython2.3 diff --git a/src/Qtx/Qtx.pro b/src/Qtx/Qtx.pro index b174dfd5b..2d1eaeee6 100644 --- a/src/Qtx/Qtx.pro +++ b/src/Qtx/Qtx.pro @@ -1,7 +1,8 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET QT += xml CONFIG -= debug release debug_and_release diff --git a/src/Qtx/QtxPreferenceMgr.cxx b/src/Qtx/QtxPreferenceMgr.cxx index ee4397694..1b12db5e6 100644 --- a/src/Qtx/QtxPreferenceMgr.cxx +++ b/src/Qtx/QtxPreferenceMgr.cxx @@ -130,7 +130,8 @@ void QtxPreferenceItem::Updater::customEvent( QEvent* /*e*/ ) \param parent parent preference item */ QtxPreferenceItem::QtxPreferenceItem( QtxPreferenceItem* parent ) -: myParent( 0 ) +: myParent( 0 ), +myEval( true ) { myId = generateId(); @@ -425,6 +426,16 @@ void QtxPreferenceItem::setOption( const QString& name, const QVariant& val ) sendItemChanges(); } +bool QtxPreferenceItem::isEvaluateValues() const +{ + return myEval; +} + +void QtxPreferenceItem::setEvaluateValues( const bool on ) +{ + myEval = on; +} + /*! \fn void QtxPreferenceItem::store(); \brief Save preference item (for example, to the resource file). @@ -588,8 +599,11 @@ bool QtxPreferenceItem::getBoolean( const bool val ) const */ QString QtxPreferenceItem::getString( const QString& val ) const { + QString res = val; QtxResourceMgr* resMgr = resourceMgr(); - return resMgr ? resMgr->stringValue( mySection, myParameter, val ) : val; + if ( resMgr ) + resMgr->value( mySection, myParameter, res, isEvaluateValues() ); + return res; } /*! @@ -748,9 +762,12 @@ void QtxPreferenceItem::triggerUpdate() \return property value or null QVariant if option is not set \sa setOptionValue() */ -QVariant QtxPreferenceItem::optionValue( const QString& /*name*/ ) const +QVariant QtxPreferenceItem::optionValue( const QString& name ) const { - return QVariant(); + QVariant val; + if ( name == "eval" || name == "evaluation" || name == "subst" || name == "substitution" ) + val = isEvaluateValues(); + return val; } /*! @@ -763,8 +780,13 @@ QVariant QtxPreferenceItem::optionValue( const QString& /*name*/ ) const \param val new property value \sa optionValue() */ -void QtxPreferenceItem::setOptionValue( const QString& /*name*/, const QVariant& /*val*/ ) +void QtxPreferenceItem::setOptionValue( const QString& name, const QVariant& val ) { + if ( name == "eval" || name == "evaluation" || name == "subst" || name == "substitution" ) + { + if ( val.canConvert( QVariant::Bool ) ) + setEvaluateValues( val.toBool() ); + } } /*! diff --git a/src/Qtx/QtxPreferenceMgr.h b/src/Qtx/QtxPreferenceMgr.h index 50fc32416..0e193db34 100644 --- a/src/Qtx/QtxPreferenceMgr.h +++ b/src/Qtx/QtxPreferenceMgr.h @@ -73,6 +73,9 @@ public: QVariant option( const QString& ) const; void setOption( const QString&, const QVariant& ); + bool isEvaluateValues() const; + void setEvaluateValues( const bool ); + virtual void store() = 0; virtual void retrieve() = 0; @@ -125,6 +128,7 @@ private: QtxPreferenceItem* myParent; ItemList myChildren; + bool myEval; QIcon myIcon; QString myTitle; QString mySection; diff --git a/src/STD/STD.pro b/src/STD/STD.pro index 7db9dfa0d..ab2ad4776 100644 --- a/src/STD/STD.pro +++ b/src/STD/STD.pro @@ -1,10 +1,11 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH = ../../include -LIBS += -L../../lib -lSUIT -lQtx +LIBS += -L../../$(CONFIG_ID)/lib -lSUIT -lQtx CONFIG -= debug release debug_and_release CONFIG += qt thread debug dll shared diff --git a/src/SUIT/SUIT.pro b/src/SUIT/SUIT.pro index 773dd3402..7bad1747f 100644 --- a/src/SUIT/SUIT.pro +++ b/src/SUIT/SUIT.pro @@ -1,10 +1,11 @@ TEMPLATE = lib -DESTDIR = ../../lib + +DESTDIR = ../../$(CONFIG_ID)/lib MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH = ../../include -LIBS += -L../../lib -lQtx +LIBS += -L../../$(CONFIG_ID)/lib -lQtx CONFIG -= debug release debug_and_release CONFIG += qt thread debug dll shared diff --git a/src/SUITApp/SUITApp.pro b/src/SUITApp/SUITApp.pro index c088c851c..d7040d3a1 100644 --- a/src/SUITApp/SUITApp.pro +++ b/src/SUITApp/SUITApp.pro @@ -1,10 +1,11 @@ TEMPLATE = app -DESTDIR = ../../bin + +DESTDIR = ../../$(CONFIG_ID)/bin MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET +OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH = ../../include -LIBS += -L../../lib -lSUIT -lQtx +LIBS += -L../../$(CONFIG_ID)/lib -lSUIT -lQtx CONFIG -= debug release debug_and_release CONFIG += qt thread debug dll shared -- 2.39.2