vymmodel.h
author insilmaril
Sat, 06 Mar 2010 20:05:02 +0000
changeset 826 e715694b0f47
parent 825 1ad892c1a709
child 829 832e96c9abb6
permissions -rw-r--r--
Changed animTicks to uint
     1 #ifndef VYMMODEL_H
     2 #define VYMMODEL_H
     3 
     4 #include <QGraphicsScene>
     5 #include <QtNetwork>
     6 
     7 #include <QtDBus/QDBusAbstractAdaptor>
     8 #include <QtDBus/QDBusVariant>
     9 
    10 #include "adaptormodel.h"
    11 #include "file.h"
    12 #include "imageitem.h"
    13 #include "mapeditor.h"
    14 #include "parser.h"
    15 #include "treeitem.h"
    16 #include "treemodel.h"
    17 
    18 class AttributeItem;
    19 class BranchItem;
    20 class MapEditor;
    21 class XLinkItem;
    22 
    23 class VymModel :  public TreeModel {		
    24 	Q_OBJECT
    25 	Q_CLASSINFO("D-Bus Interface", "org.insilmaril.vym.VymModel-h")
    26 
    27 
    28 ////////////////////////////////////////////
    29 // General housekeeping
    30 ////////////////////////////////////////////
    31 private:
    32 	QString version;	//!< version string saved in vym file
    33 	QString author;
    34 	QString comment;
    35 	QDate date;
    36 
    37 	static uint idLast;		//! the last used unique ID
    38 	uint mapID;
    39 
    40 public:
    41 	VymModel();
    42 	~VymModel ();
    43     void clear();
    44     void init();
    45 	void makeTmpDirectories();		//!< create temporary directories e.g. for history
    46 
    47 	MapEditor* getMapEditor();			// FIXME-2 still necessary?
    48 	uint getID();						//! Return unique ID of model
    49 
    50 	bool isRepositionBlocked();		//!< While load or undo there is no need to update graphicsview
    51 
    52 	void updateActions();			//!< Update buttons in mainwindow
    53 
    54 
    55 ////////////////////////////////////////////
    56 // Load/save 
    57 ////////////////////////////////////////////
    58 private:
    59 
    60 	bool zipped;				// should map be zipped
    61 	static	int mapNum;			// unique number for model used in save/undo
    62 	FileType fileType;			// type of file, e.g. vym, freemind...
    63 	QString fileName;			// short name of file (for tab)
    64 	QString filePath;			// path to file which will be saved
    65 	QString fileDir;			// dir where file is saved
    66 	QString destPath;			// path to .vym file (needed for vymlinks)
    67 	QString mapName;			// fileName without ".vym"
    68 
    69 	QString tmpMapDir;			// tmp directory with undo history
    70 
    71 	QTimer *autosaveTimer;
    72 	QTimer *fileChangedTimer;
    73 	QDateTime fileChangedTime;
    74 
    75 public:
    76 	/*! This function saves all information of the map to disc.
    77 	    saveToDir also calls the functions for all BranchObj and other objects in the map.
    78 		The structure of the map itself is returned as QString and passed back to Main, 
    79 		where saveToDir is called initially
    80 	*/	
    81     QString saveToDir (const QString &tmpdir, const QString &prefix, bool writeflags, const QPointF &offset, TreeItem *saveSel);
    82 
    83 	/*! Save all data in tree*/
    84 	QString saveTreeToDir (const QString&,const QString&,const QPointF&);// Save data recursivly to tempdir
    85 
    86 
    87 	/*! \brief Sets filepath, filename and mapname
    88 
    89 	     If the filepath is "/home/tux/map.xml", then the filename will be set
    90 		 to map.xml. The destname is needed for vymLinks, pointing to another map. 
    91 		 The destname holds the real name of the file, after it has been compressed, e.g. "map.vym"
    92 	*/	 
    93 
    94 
    95 	/*! \brief Set File path
    96 
    97 	     The destname is needed to construct the references between maps
    98 	*/	 
    99 	void setFilePath (QString filepath,QString destname);	
   100 	void setFilePath (QString);	//!< Overloaded for convenience
   101 	QString getFilePath ();	//!< Full path e.g. "/home/tux/map.xml"
   102 	QString getFileName ();	//!< e.g. "map.xml"
   103 	QString getMapName ();	//!< e.g. "map"
   104 	QString getDestPath (); //!< e.g. "/home/tux/map.vym"
   105 
   106 	/*! \brief Load map
   107 
   108 		The data is read from file. Depending on LoadMode the current
   109 		selection gets replaced by data or the data is appended.
   110 	*/	
   111     ErrorCode load (QString, const LoadMode &, const FileType& );	// newmap, import/replace selection
   112 
   113 public:
   114 	/*! \brief Save the map to file */
   115     ErrorCode save(const SaveMode &);	
   116 
   117 private:
   118     void addMapReplaceInt(const QString & undoSel, const QString & path);
   119     bool addMapInsertInt (const QString & path);
   120     bool addMapInsertInt (const QString & path, int pos);
   121 
   122 	ImageItem* loadFloatImageInt (BranchItem *dst,QString);
   123 	void saveFloatImageInt (ImageItem*, const QString &, const QString &);
   124 public:	
   125 	void loadFloatImage ();
   126 	void saveFloatImage ();
   127 
   128 private:	
   129     void importDirInt(BranchItem *,QDir);
   130     void importDirInt(const QString&);
   131 public:	
   132     void importDir();
   133 
   134 private slots:
   135 	void autosave ();
   136 	void fileChanged();
   137 
   138 ////////////////////////////////////////////
   139 // history (undo/redo)
   140 ////////////////////////////////////////////
   141 private:
   142     bool mapDefault;			//!< Flag if map is untouched
   143     bool mapChanged;			//!< Flag if undo is possible
   144 	bool mapUnsaved;			//!< Flag if map should be saved
   145 
   146 	QString histPath;			//!< Path to history file
   147 	SimpleSettings undoSet;		//!< undo/redo commands, saved in histPath
   148 	int stepsTotal;				//!< total number of steps (undos+redos) 
   149 	int curStep;				//!< Current step in history (ring buffer)
   150 	int curClipboard;			//!< number of history step, which is the current clipboard
   151 	int redosAvail;				//!< Available number of redo steps
   152 	int undosAvail;				//!< Available number of undo steps
   153 	bool blockReposition;		//!< block while load or undo
   154 	bool blockSaveState;		//!< block while load or undo
   155 public:
   156 	bool isDefault();			//!< true, if map is still the empty default map
   157 	void makeDefault();			//!< Reset changelog, declare this as default map
   158     bool hasChanged()	;		//!< true, if something has changed and is not saved yet
   159 	void setChanged();			//!< called from TextEditor via LinkableMapObj
   160 
   161 	/*! \brief Get name of object
   162 	  
   163 	  Returns heading of a branch or name of an object for use in comment
   164 	  of undo/redo history
   165 	*/ 
   166 	QString getObjectName(LinkableMapObj*);	
   167 	QString getObjectName(TreeItem*);	
   168 
   169     void redo();						//!< Redo last action
   170 	bool isRedoAvailable();				//!< True, if redo is available
   171     void undo();						//!< Undo last action
   172 	bool isUndoAvailable();				//!< True, if undo is available
   173 	void gotoHistoryStep (int);			//!< Goto a specifig step in history
   174 
   175 
   176 	QString getHistoryPath();			//!< Path to directory containing the history
   177 
   178 	/*! \brief Save the current changes in map 
   179 
   180 		Two commands and selections are saved:
   181 
   182 			- undocommand and undoselection to undo the change
   183 			- redocommand and redoselection to redo the action after an undo
   184 
   185 		Additionally a comment is logged. 
   186 
   187 	*/	
   188     void saveState(
   189 		const SaveMode& savemode, 
   190 		const QString &undoSelection, 
   191 		const QString &undoCommand, 
   192 		const QString &redoSelection, 
   193 		const QString &redoCommand, 
   194 		const QString &comment, 
   195 		TreeItem *saveSelection);
   196 	/*! Overloaded for convenience */
   197     void saveStateChangingPart(
   198 		TreeItem *undoSelection, 
   199 		TreeItem* redoSelection, 
   200 		const QString &redoCommand, 
   201 		const QString &comment);
   202 	/*! Overloaded for convenience */
   203     void saveStateRemovingPart(
   204 		TreeItem *redoSelection, 
   205 		const QString &comment);
   206 	/*! Overloaded for convenience */
   207     void saveState(
   208 		TreeItem *undoSelection, 
   209 		const QString &undoCommand, 
   210 		TreeItem *redoSelection, 
   211 		const QString &redoCommand, 
   212 		const QString &comment); 
   213 	/*! Overloaded for convenience */
   214     void saveState(
   215 		const QString &undoSelection, 
   216 		const QString &undoCommand, 
   217 		const QString &redoSelection, 
   218 		const QString &redoCommand, 
   219 		const QString &comment) ;
   220     void saveState(
   221 		const QString &undoCommand, 
   222 		const QString &redoCommand, 
   223 		const QString &comment) ;
   224 
   225 
   226 ////////////////////////////////////////////
   227 // unsorted so far
   228 ////////////////////////////////////////////
   229 private:
   230 	QGraphicsScene *mapScene;
   231 public:
   232 	void setScene(QGraphicsScene *s);
   233 	QGraphicsScene *getScene();
   234 
   235     TreeItem* findBySelectString (QString s);		
   236     TreeItem* findID (const uint &i);		// find MapObj by unique ID
   237 
   238 
   239 ////////////////////////////////////////////
   240 // Interface 
   241 ////////////////////////////////////////////
   242 public:
   243 	void setVersion(const  QString &);
   244 	QString getVersion();
   245 	void setAuthor  (const QString &);
   246 	QString getAuthor ();
   247 	void setComment (const QString &);
   248 	QString getComment ();
   249 	QString getDate();
   250 	int branchCount();
   251 
   252 	void setSortFilter (const QString &);
   253 	QString getSortFilter ();
   254 protected:	
   255 	QString sortFilter;
   256 signals:
   257 	void sortFilterChanged (QString );		//!< Notify editors of new filter
   258 
   259 public:
   260 	void setHeading(const QString &);		//!< Set heading of item	
   261 	QString getHeading ();					//!< Get heading of item
   262 	void setNote(const QString &s);			//!< Set note text
   263 	QString getNote();						//!< Get note text
   264 
   265 private:
   266 	BranchItem* findCurrent;				// next object in find process
   267 	BranchItem* findPrevious;				// next object in find process
   268 	bool EOFind;							// true, if search failed
   269 
   270 public:
   271 	void findDuplicateURLs();				// find duplicate URLs, testing only so far
   272     BranchItem* findText(QString,bool);		// Find object
   273     void findReset();						// Reset Search
   274 	void emitShowFindWidget();				// Tell views to show FindWidget
   275 private:	
   276 	QString findString;
   277 signals:
   278 	void showFindWidget();				
   279 
   280 public:
   281 	void setURL(const QString &url);
   282 	QString getURL();						// returns URL of selection or ""
   283 	QStringList getURLs(bool ignoreScrolled=true);	// returns URLs of subtree
   284 
   285 
   286 	void setFrameType(const FrameObj::FrameType &);
   287 	void setFrameType(const QString &);
   288 	void setFramePenColor (const QColor &);
   289 	void setFrameBrushColor (const QColor &);
   290 	void setFramePadding (const int &);
   291 	void setFrameBorderWidth (const int &);
   292 	void setIncludeImagesVer(bool);
   293 	void setIncludeImagesHor(bool);
   294 	void setHideLinkUnselected (bool);
   295 
   296 	/*! Should object be hidden in exports (clouded)? */
   297 	void setHideExport(bool);			
   298 
   299 	/*! Should object be hidden in exports (clouded)? */
   300 	void toggleHideExport();		
   301 
   302 	void addTimestamp();		
   303 
   304     void copy();						//!< Copy to clipboard
   305 private:	
   306     void pasteNoSave(const int &n);		//!< paste clipboard to branch
   307 public:	
   308     void paste();			//!< Paste clipboard to branch and backup
   309     void cut();				//!< Cut to clipboard (and copy)
   310 
   311     bool moveUp(BranchItem *bi);	//!< Move branch up without saving state
   312     void moveUp();					//!< Move branch up with saving state
   313     bool moveDown(BranchItem *bi);	//!< Move branch down without saving state
   314     void moveDown();		//!< Move branch down
   315 	void detach();					//!< Detach branch and use as new mapcenter
   316 	void sortChildren(bool inverse=false);	//!< Sort children lexically
   317 
   318 	// The create methods are used to quickly parse a XML file
   319 	BranchItem* createMapCenter();				//!< Create MapCenter 
   320 	BranchItem* createBranch(BranchItem *dst);	//!< Create Branch
   321 	ImageItem* createImage(BranchItem *dst);	//!< Create image
   322 	XLinkItem* createXLink(BranchItem *dst,bool createMO=false);	//!< Create XLink starting at dst
   323 
   324 	AttributeItem* addAttribute();
   325 	AttributeItem* addAttribute(AttributeItem* );
   326 
   327 	/*! \brief Add new mapcenter
   328 
   329 	    Disclaimer: Still experimental, not fully supported yet.
   330 	*/	
   331 	BranchItem* addMapCenter();
   332 private:	
   333 	BranchItem* addMapCenter(QPointF absPos);
   334 
   335 	/*! \brief Add new branch
   336 
   337 		Depending on num the new branch is created
   338 
   339 		-3 above selection as child of selections parent
   340 		-2 as child of selection
   341 		-1 below selection as child of selections parent
   342 		0..n	insert at a specific position in selections parent
   343 		(needed for free relinking)
   344 	*/	
   345 
   346 private:	
   347     BranchItem* addNewBranchInt(BranchItem *dst, int pos);	// pos allows to add above/below selection
   348 public:	
   349 	/*! \Add new branch
   350 		
   351 		Depending on num the new branch is created
   352 		-1 above selection
   353 		 0 as child of selection
   354 		 1 below selection
   355 	*/
   356     BranchItem* addNewBranch(int pos=0);		
   357     BranchItem* addNewBranchBefore();		//!< Insert branch between selection and its parent
   358 	/*! \brief Relink a branch to a new destination dst 
   359 	    Relinks branch to dst at branch position pos. There is no saveState
   360 		here, as for example moveUp or moving in MapEditor have
   361 		different needs to call saveState
   362 		Returns true if relinking was successful.
   363 	*/	
   364 	bool relinkBranch (BranchItem* branch, BranchItem* dst, int pos =-1);	
   365 	bool relinkImage  (ImageItem* image, BranchItem* dst);	
   366 
   367     void deleteSelection();				//!< Delete selection
   368 	void deleteKeepChildren();			//!< remove branch, but keep children
   369 	void deleteChildren();				//!< keep branch, but remove children
   370 
   371 	TreeItem* deleteItem(TreeItem*);	//!< Delete item and return parent (if parent!= rootItem)
   372 	void clearItem (TreeItem* ti);		//!< Remove all children of TreeItem ti
   373 	bool scrollBranch(BranchItem *);
   374 	bool unscrollBranch(BranchItem *);
   375 public:	
   376     void toggleScroll();
   377     void unscrollChildren();
   378 	void emitExpandAll();
   379 	void emitExpandOneLevel();
   380 	void emitCollapseOneLevel();
   381 signals:	
   382 	void expandAll();
   383 	void expandOneLevel();
   384 	void collapseOneLevel();
   385 
   386 public:	
   387 	void toggleStandardFlag (const QString &name, FlagRow *master=NULL);
   388     void addFloatImage(const QPixmap &img);
   389 
   390     void colorBranch(QColor);
   391     void colorSubtree(QColor);
   392 	QColor getCurrentHeadingColor();
   393 
   394 
   395 	void editURL();							// edit URL
   396 	void editLocalURL();					// edit URL to local file
   397 	void editHeading2URL();					// copy heading to URL
   398 	void editBugzilla2URL();				// create URL to Bugzilla
   399 	void getBugzillaData();					// get data from Novell Bugzilla
   400 	void editFATE2URL();					// create URL to FATE
   401 	void editVymLink();						// edit link to another map
   402 	void setVymLink (const QString &);	// Set vymLink for selection
   403 	void deleteVymLink();					// delete link to another map
   404 	QString getVymLink();					// return path to map
   405 	QStringList getVymLinks();				// return paths in subtree
   406 	void followXLink (int);
   407 	void editXLink (int);
   408 
   409 
   410 
   411 
   412 ////////////////////////////////////////////
   413 // Scripting
   414 ////////////////////////////////////////////
   415 public:	
   416 
   417 	/* \brief Process one command and its parameters */
   418     QVariant parseAtom (const QString &atom, bool &noError, QString &errorMsg);	
   419 
   420 	/* \brief Runs the script */
   421 	QVariant runScript (const QString &script);
   422 
   423 private:
   424 	Parser parser;
   425 
   426 ////////////////////////////////////////////
   427 // Exports
   428 ////////////////////////////////////////////
   429 private:
   430 	TreeItem::HideTmpMode hidemode;	// true while exporting to hide some stuff
   431 
   432 public:
   433 	/*! Set or unset temporary hiding of objects during export  */
   434 	void setExportMode (bool);
   435 
   436 	/*! Save as image */
   437     void exportImage (QString fname="",bool askForName=true,QString format="PNG");
   438 
   439 
   440 	/*! Export as XTML to directory */
   441     void exportXML(QString dir="", bool askForName=true);
   442 
   443 	/*! Export as A&O report text to file */
   444 	void exportAO (QString fname="",bool askForName=true);  
   445 
   446 	/*! Export as ASCII text to file */
   447 	void exportASCII (QString fname="",bool askForName=true);  
   448 
   449 	/*! Export as HTML to directory */
   450     void exportHTML(const QString& dir="", bool useDialog=true);	
   451     void exportXHTML(const QString& dir="", bool askForName=true);	
   452 
   453     /*! Export as OpenOfficeOrg presentation */
   454     void exportOOPresentation(const QString &,const QString &);	
   455 
   456 
   457 ////////////////////////////////////////////
   458 // View related
   459 ////////////////////////////////////////////
   460 public:
   461 	void registerEditor (QWidget *);
   462 	void unregisterEditor (QWidget *);
   463 
   464 private: 
   465 	QPointF contextPos;					//!< local position during context menu
   466 public:
   467 	void setContextPos (QPointF);		//!< local position during context menu
   468 	void unsetContextPos ();			//!< forget local position after context menu
   469 
   470 	void updateNoteFlag();				//!< Signal origination in TextEditor
   471 	void reposition();					//!< Call reposition for all MCOs
   472 	void setHideTmpMode (TreeItem::HideTmpMode mode);	
   473 
   474 	void emitNoteHasChanged (TreeItem *ti);
   475 	void emitDataHasChanged (TreeItem *ti);
   476 
   477 signals:
   478 	void noteHasChanged (QModelIndex ix);
   479 	void newChildObject(QModelIndex ix);
   480 
   481 private:
   482 	MapEditor *mapEditor;
   483 
   484 	QColor defLinkColor;		// default color for links
   485 	QColor defXLinkColor;		// default color for xlinks
   486 	int defXLinkWidth;			// default width for xlinks
   487 	LinkableMapObj::ColorHint linkcolorhint;// use heading color or own color
   488 	LinkableMapObj::Style linkstyle;		// default style for links
   489 
   490 public:
   491 	void setMapLinkStyle (const QString &);	// Set style of link
   492 	LinkableMapObj::Style getMapLinkStyle ();	// requested in LMO
   493 	void setMapDefLinkColor(QColor);		// default color of links
   494 	void setMapLinkColorHintInt();			// color of links
   495 	void setMapLinkColorHint(LinkableMapObj::ColorHint);// color of links
   496 	void toggleMapLinkColorHint();			// after changing linkStyles
   497     void selectMapBackgroundImage();
   498     void setMapBackgroundImage(const QString &);
   499     void selectMapBackgroundColor();
   500     void setMapBackgroundColor(QColor);
   501     QColor getMapBackgroundColor();
   502 
   503 
   504 	LinkableMapObj::ColorHint getMapLinkColorHint();
   505 	QColor getMapDefLinkColor();
   506 	void setMapDefXLinkColor(QColor);
   507 	QColor getMapDefXLinkColor();
   508 	void setMapDefXLinkWidth (int);
   509 	int getMapDefXLinkWidth();
   510 
   511 	/*!  Move absolutly to (x,y).  */	
   512     void move    (const double &x, const double &y);
   513 
   514 	/*!  Move relativly to (x,y).  */	
   515     void moveRel (const double &x, const double &y);
   516 
   517 ////////////////////////////////////////////
   518 // Animation  **experimental**
   519 ////////////////////////////////////////////
   520 private:	
   521 	QTimer *animationTimer;
   522 	bool animationUse;
   523 	uint animationTicks;
   524 	uint animationInterval;
   525 	int timerId;				// animation timer
   526 	QList <MapObj*> animObjList;// list with animated objects //FIXME-2 should go to MapEditor
   527 
   528 private slots:
   529 	void animate();						//!< Called by timer to animate stuff
   530 public:
   531 	void startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest);
   532 	void stopAnimation(MapObj *mo);
   533 
   534 ////////////////////////////////////////////
   535 // Network related 
   536 ////////////////////////////////////////////
   537 public:
   538     /*! \brief Networking states
   539 		
   540 		In Network modus we want to switch of saveState, autosave, ...
   541 	*/
   542 	enum NetState {
   543 		Offline,			//!< Offline
   544 		Client,				//!< I am the client and connected to server
   545 		Server				//!< I am the server
   546 	};
   547 
   548 private:
   549 	// Network connections **Experimental**
   550 	NetState netstate;			// offline, client, server
   551 	QTcpServer *tcpServer;		// Act as server in conference mode (experimental)
   552 	QList <QTcpSocket*> clientList;		// List of connected clients
   553 	quint16 sendCounter;		// Increased with every sent command
   554 
   555 	QTcpSocket	*clientSocket;	// socket of this client
   556 	QString server;				// server address of this client
   557 	int port;					// server port of this client
   558 
   559 
   560 
   561 protected:
   562 	void sendSelection();
   563 
   564 public:
   565 	void newServer();
   566 	void connectToServer();
   567 
   568 private slots:	
   569 	void newClient();
   570 	void sendData(const QString &s);
   571 	void readData();
   572 	void displayNetworkError (QAbstractSocket::SocketError);
   573 
   574 ////////////////////////////////////////////
   575 // DBUS related 
   576 ////////////////////////////////////////////
   577 
   578 private:
   579 AdaptorModel *adaptorModel; //FIXME-3
   580 
   581 public slots:
   582 	void testslot();
   583 
   584 ////////////////////////////////////////////
   585 // Selection related 
   586 ////////////////////////////////////////////
   587 private:
   588 	TreeItem *latestAddedItem;				// latest added object, reset on setChanged()
   589 
   590 public:
   591 	void setSelectionModel(QItemSelectionModel *);		// Set common selectionModel
   592 	QItemSelectionModel* getSelectionModel();
   593 
   594 	void setSelectionBlocked(bool);
   595 	bool isSelectionBlocked();
   596 
   597 	bool select ();							//! select by using common QItemSelectionModel
   598 	bool select (const QString &);			//! Select by string
   599 	bool select (LinkableMapObj *lmo);		//! Select by pointer to LMO
   600 	bool select (TreeItem *ti );			//! Select by pointer to TreeItem
   601 	bool select (const QModelIndex &index);	//! Select by ModelIndex
   602 	void unselect();
   603 	bool reselect();
   604 
   605 	void emitShowSelection();				//!< Show selection in all views
   606 signals:
   607 	void showSelection();
   608 
   609 public:	
   610     bool selectFirstBranch();
   611     bool selectLastBranch();
   612 	bool selectLastSelectedBranch();
   613 	bool selectParent();
   614 
   615 public:
   616 	TreeItem::Type selectionType();
   617 	LinkableMapObj* getSelectedLMO();
   618 	BranchObj* getSelectedBranchObj();	// FIXME-3 replace by item...
   619 	BranchItem* getSelectedBranch();
   620 	ImageItem* getSelectedImage();
   621 	AttributeItem* getSelectedAttribute();
   622 	TreeItem* getSelectedItem();
   623 	QModelIndex getSelectedIndex();
   624 	QString getSelectString ();
   625 	QString getSelectString (LinkableMapObj *lmo);
   626 	QString getSelectString (TreeItem *item);
   627 	
   628 	
   629 signals:
   630 	void selectionChanged(const QItemSelection &newsel, const QItemSelection &oldsel);
   631 
   632 public:
   633 	void emitSelectionChanged(const QItemSelection &oldsel);
   634 	void emitSelectionChanged();
   635 	void selectMapLinkColor();
   636     void selectMapSelectionColor();
   637 private:	
   638     void setSelectionColorInt(QColor);
   639 	QItemSelectionModel *selModel;
   640 	QString lastSelectString;
   641 	bool selectionBlocked;		//! Used to block changes of selection while editing a heading
   642 
   643 public:	
   644     void setSelectionColor(QColor);
   645     QColor getSelectionColor();
   646 };
   647 
   648 #endif