The *Location classes can now be used with QVariant, QHash and signals/slots.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1487 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-02-05 19:24:42 +00:00
parent 0e63192a3d
commit 7d4b90ca3a
4 changed files with 27 additions and 1 deletions

View File

@@ -18,6 +18,9 @@
#include "elementslocation.h"
#include "qetapp.h"
// make this class usable with QVariant
int ElementsLocation::MetaTypeId = qRegisterMetaType<ElementsLocation>("ElementsLocation");
/**
Constructeur par defaut
*/
@@ -205,3 +208,11 @@ ElementsLocation ElementsLocation::locationFromString(const QString &string) {
location.fromString(string);
return(location);
}
/**
@param location A standard element location
@return a hash identifying this location
*/
uint qHash(const ElementsLocation &location) {
return(qHash(location.toString()));
}