Changeset 2230
- Timestamp:
- 08/26/08 23:07:17 (3 months ago)
- Location:
- v2/branches/dev
- Files:
-
- 5 modified
-
config.pri (modified) (1 diff)
-
monkey/src/xupmanager/FilteredProjectItemModel.h (modified) (1 diff)
-
monkey/src/xupmanager/XUPItem.cpp (modified) (2 diffs)
-
monkey/src/xupmanager/XUPProjectItem.cpp (modified) (3 diffs)
-
monkey/src/xupmanager/XUPProjectItem.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v2/branches/dev/config.pri
r2211 r2230 48 48 QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2005 - 2008 Filipe AZEVEDO" 49 49 PACKAGE_DOMAIN = "www.monkeystudio.org" 50 PACKAGE_VERSION = 1.8.2.2svn 50 PACKAGE_VERSION = 1.8.2.2svn_debug 51 51 52 52 # define variable for source code -
v2/branches/dev/monkey/src/xupmanager/FilteredProjectItemModel.h
r2227 r2230 9 9 #include "XUPItem.h" 10 10 #include "XUPProjectItem.h" 11 12 #include <QDebug> 11 13 12 14 class ProjectItemModel; -
v2/branches/dev/monkey/src/xupmanager/XUPItem.cpp
r2229 r2230 288 288 QString XUPItem::valueName( const QString& s ) const 289 289 { 290 if ( project() ->textTypes().contains( s ) ) //FIXME Do it's right?290 if ( project() && project()->textTypes().contains( s ) ) //FIXME Do it's right? 291 291 return "text"; 292 292 return "name"; … … 338 338 void XUPItem::setModified( bool b, bool e ) 339 339 { 340 if ( isProject() && b && !modified() ) 341 { 342 mModified = true; 343 if ( e ) 344 emit modifiedChanged( this, true ); 345 } 346 else if ( isProject() && !b && modified() ) 347 { 348 foreach ( XUPItem* it, children( true, true ) ) 349 if ( it->modified() ) 350 it->setModified( false, false ); 351 mModified = false; 352 if ( e ) 353 emit modifiedChanged( this, false ); 354 } 355 else if ( mModified != b ) 340 if ( mModified != b ) 356 341 { 357 342 mModified = b; -
v2/branches/dev/monkey/src/xupmanager/XUPProjectItem.cpp
r2229 r2230 9 9 XUPItemInfos XUPProjectItem::mXUPItemInfos; 10 10 11 XUPProjectItem::XUPProjectItem( const QDomElement e, const QString& s , bool b)11 XUPProjectItem::XUPProjectItem( const QDomElement e, const QString& s) 12 12 { 13 13 #if 0 … … 17 17 setDomElement( e ); 18 18 loadProject( s ); 19 setModified( b );20 19 } 21 20 … … 91 90 void XUPProjectItem::registerVariableSuffixes( const QString& n, const QStringList& s ) 92 91 { mXUPItemInfos.VariableSuffixes[n] = s; } 92 93 XUPProjectItem* XUPProjectItem::project() 94 { 95 return this; 96 } 97 98 void XUPProjectItem::setModified( bool b, bool e ) 99 { 100 if (b && !modified() ) 101 { 102 mModified = true; 103 if ( e ) 104 emit modifiedChanged( this, true ); 105 } 106 else if (!b && modified() ) 107 { 108 foreach ( XUPItem* it, children( true, true ) ) 109 if ( it->modified() ) 110 it->setModified( false, false ); 111 mModified = false; 112 if ( e ) 113 emit modifiedChanged( this, false ); 114 } 115 } 93 116 94 117 QStringList XUPProjectItem::projectSettingsValues( const QString& variable, const QStringList& defaultValues ) const -
v2/branches/dev/monkey/src/xupmanager/XUPProjectItem.h
r2229 r2230 12 12 static QString mProjectSettingsScope; 13 13 14 XUPProjectItem( const QDomElement = QDomDocument().toElement(), const QString& = QString() , bool = false);14 XUPProjectItem( const QDomElement = QDomDocument().toElement(), const QString& = QString()); 15 15 16 16 // register item specific infos … … 57 57 // return copy of this item 58 58 virtual XUPProjectItem* clone( bool = true ) const = 0; 59 60 // return the project item of this item (this!!!). Implemented for overloading of XUPItem's function 61 virtual XUPProjectItem* project(); 62 63 // set item modified state and emit modified signal according to second parameter 64 virtual void setModified( bool, bool = true ); 59 65 60 66 // return a project settings value
