summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-03 02:59:27 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-03 02:59:27 -0500
commit2124d406af6e50ae5c7fbb88ab5b1e0a9bb08ca2 (patch)
treed7b12db7a51ca944c8160d8d38f3aaa70ebb8e33
parentd2bba70fb583f64f8151a79f739e16dfb3928ebc (diff)
Moved const values in BaseModel to the source file
-rw-r--r--sigmodr/models/BaseModel.cpp8
-rw-r--r--sigmodr/models/BaseModel.h12
2 files changed, 13 insertions, 7 deletions
diff --git a/sigmodr/models/BaseModel.cpp b/sigmodr/models/BaseModel.cpp
index 12c88711..643e62d3 100644
--- a/sigmodr/models/BaseModel.cpp
+++ b/sigmodr/models/BaseModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ * Copyright 2008-2009 Ben Boeckel <MathStuf@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,6 +31,12 @@
#include <QtCore/QFile>
#include <QtXml/QDomDocument>
+const int Sigmodr::BaseModel::TypeRole = Qt::UserRole;
+const int Sigmodr::BaseModel::DropAcceptRole = Qt::UserRole + 1;
+const int Sigmodr::BaseModel::XmlRole = Qt::UserRole + 2;
+const int Sigmodr::BaseModel::WidgetRole = Qt::UserRole + 3;
+const int Sigmodr::BaseModel::ContextMenuRole = Qt::UserRole + 4;
+
Sigmodr::BaseModel::BaseModel(BaseModel* parent, Sigmod::Object* object, const QString& name) :
m_parent(parent),
m_object(object),
diff --git a/sigmodr/models/BaseModel.h b/sigmodr/models/BaseModel.h
index 567c370c..3b9de8b2 100644
--- a/sigmodr/models/BaseModel.h
+++ b/sigmodr/models/BaseModel.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ * Copyright 2008-2009 Ben Boeckel <MathStuf@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,11 +62,11 @@ class BaseModel : public QObject
bool loadFromData(const QString& data, QDomDocument* xml) const;
- static const int TypeRole = Qt::UserRole;
- static const int DropAcceptRole = Qt::UserRole + 1;
- static const int XmlRole = Qt::UserRole + 2;
- static const int WidgetRole = Qt::UserRole + 3;
- static const int ContextMenuRole = Qt::UserRole + 4;
+ static const int TypeRole;
+ static const int DropAcceptRole;
+ static const int XmlRole;
+ static const int WidgetRole;
+ static const int ContextMenuRole;
signals:
void rowChanged(const int row);
void rowsChanged(const QList<int>& rows);