vymmodel.h
changeset 775 6e4b586aa88a
parent 773 340bc29da9a0
child 776 25e634a7e1dc
     1.1 --- a/vymmodel.h	Tue May 26 11:24:51 2009 +0000
     1.2 +++ b/vymmodel.h	Wed Jun 03 20:37:17 2009 +0000
     1.3 @@ -5,7 +5,7 @@
     1.4  #include <QtNetwork>
     1.5  
     1.6  #include "file.h"
     1.7 -#include "mapcenterobj.h"
     1.8 +#include "floatimageobj.h"
     1.9  #include "mapeditor.h"
    1.10  #include "parser.h"
    1.11  #include "treeitem.h"
    1.12 @@ -107,7 +107,7 @@
    1.13      void addMapReplaceInt(const QString & undoSel, const QString & path);
    1.14      void addMapInsertInt (const QString & path, int pos);
    1.15  
    1.16 -	FloatImageObj* loadFloatImageInt (QString);
    1.17 +	FloatImageObj* loadFloatImageInt (BranchItem *dst,QString);
    1.18  	void saveFloatImageInt (FloatImageObj*, const QString &, const QString &);
    1.19  public:	
    1.20  	void loadFloatImage ();
    1.21 @@ -280,9 +280,9 @@
    1.22  	void sortChildren();	//!< Sort children lexically
    1.23  
    1.24  	// The create methods are used to quickly parse a XML file
    1.25 -	BranchItem* createMapCenter();	//!< Create and select MapCenter // FIXME-3 maybe join this also with createBranch
    1.26 -	BranchItem* createBranch();			//!< Create and select Branch
    1.27 -	TreeItem* createImage();			//!< Create and select image
    1.28 +	BranchItem* createMapCenter();				//!< Create MapCenter 
    1.29 +	BranchItem* createBranch(BranchItem *dst);	//!< Create Branch
    1.30 +	TreeItem* createImage(BranchItem *dst);		//!< Create image
    1.31  
    1.32  	/*! \brief Add new mapcenter
    1.33  
    1.34 @@ -313,7 +313,7 @@
    1.35  		 0 as child of selection
    1.36  		 1 below selection
    1.37  	*/
    1.38 -    BranchItem* addNewBranch(int pos);		
    1.39 +    BranchItem* addNewBranch(int pos=0);		
    1.40      BranchItem* addNewBranchBefore();		//!< Insert branch between selection and its parent
    1.41  	/*! \brief Relink a branch to a new destination dst 
    1.42  	    Relinks branch to dst at branch position pos. There is no saveState
    1.43 @@ -539,9 +539,6 @@
    1.44  private:
    1.45  	TreeItem *latestAddedItem;				// latest added object, reset on setChanged()
    1.46  
    1.47 -signals:
    1.48 -	void selectionChanged(const QItemSelection &, const QItemSelection &);
    1.49 -
    1.50  public:
    1.51  	void setSelectionModel(QItemSelectionModel *);		// Set common selectionModel
    1.52  	QItemSelectionModel* getSelectionModel();
    1.53 @@ -591,14 +588,15 @@
    1.54  	QString getSelectString (TreeItem *item);
    1.55  	
    1.56  	
    1.57 -	/*
    1.58 +signals:
    1.59 +	void selectionChanged(const QItemSelection &newsel, const QItemSelection &oldsel);
    1.60 +
    1.61  public slots:
    1.62 -	void changeSelection (const QItemSelection &newSel, const QItemSelection &delSel);
    1.63 -	*/
    1.64 +	void updateSelection (const QItemSelection &newSel, const QItemSelection &delSel);
    1.65  
    1.66  public:
    1.67 -	void updateSelection(const QItemSelection &oldsel);
    1.68 -	void updateSelection();
    1.69 +	void emitSelectionChanged(const QItemSelection &oldsel);
    1.70 +	void emitSelectionChanged();
    1.71  	void selectMapLinkColor();
    1.72      void selectMapSelectionColor();
    1.73  private: