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