r23441 by jghali - Rename a few Mark members

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 11 02:15:45 UTC 2020


Author: jghali
Date: Sat Jan 11 02:15:45 2020
New Revision: 23441

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23441
Log:
Rename a few Mark members

Modified:
    trunk/Scribus/scribus/marks.cpp
    trunk/Scribus/scribus/marks.h

Modified: trunk/Scribus/scribus/marks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23441&path=/trunk/Scribus/scribus/marks.cpp
==============================================================================
--- trunk/Scribus/scribus/marks.cpp	(original)
+++ trunk/Scribus/scribus/marks.cpp	Sat Jan 11 02:15:45 2020
@@ -6,8 +6,8 @@
 Mark::Mark(const Mark& other)
 	: label(other.label),
 	  OwnPage(other.OwnPage),
-	  typ(other.typ),
-	  data(other.data)
+	  m_type(other.m_type),
+	  m_data(other.m_data)
 {
 
 }
@@ -16,83 +16,83 @@
 {
 	label = l;
 	OwnPage = p;
-	typ = t;
-	data = d;
+	m_type = t;
+	m_data = d;
 }
 
 void Mark::getMark(QString& l, MarkType& t) const
 {
-	l = data.destmarkName;
-	t = data.destmarkType;
+	l = m_data.destmarkName;
+	t = m_data.destmarkType;
 }
 
 void Mark::setMark(Mark* mP)
 {
 	if (mP == nullptr)
 	{
-		data.destmarkName = "";
-		data.destmarkType = MARKNoType;
+		m_data.destmarkName = "";
+		m_data.destmarkType = MARKNoType;
 	}
 	else
 	{
-		data.destmarkName = mP->label;
-		data.destmarkType = mP->getType();
+		m_data.destmarkName = mP->label;
+		m_data.destmarkType = mP->getType();
 	}
 }
 
 void Mark::setMark(const QString& l, MarkType t)
 {
-	data.destmarkName = l;
-	data.destmarkType = t;
+	m_data.destmarkName = l;
+	m_data.destmarkType = t;
 }
 
 const QString Mark::getString() const
 {
-	return data.strtxt;
+	return m_data.strtxt;
 }
 
 void Mark::setString(const QString& str)
 {
-	data.strtxt = str;
+	m_data.strtxt = str;
 }
 
 void Mark::setNotePtr(TextNote* note)
 {
-	data.notePtr = note;
+	m_data.notePtr = note;
 }
 
 bool Mark::hasItemPtr() const
 {
-	return data.itemPtr != nullptr;
+	return m_data.itemPtr != nullptr;
 }
 
 bool Mark::hasString() const
 {
-	return !data.strtxt.isEmpty();
+	return !m_data.strtxt.isEmpty();
 }
 
 bool Mark::hasMark() const
 {
-	return data.destmarkName != "";
+	return m_data.destmarkName != "";
 }
 
 bool Mark::isUnique() const
 {
-	return ((typ != MARKVariableTextType) && (typ != MARKIndexType) && (typ != MARKBullNumType));
+	return ((m_type != MARKVariableTextType) && (m_type != MARKIndexType) && (m_type != MARKBullNumType));
 }
 
 bool Mark::isNoteType() const
 {
-	return ((typ == MARKNoteMasterType) || (typ == MARKNoteFrameType));
+	return ((m_type == MARKNoteMasterType) || (m_type == MARKNoteFrameType));
 }
 
 bool Mark::isType(const MarkType t) const
 {
-	return t == typ;
+	return (m_type == t);
 }
 
 BulNumMark::BulNumMark()
 {
 	label = "BullNumMark";
-	typ = MARKBullNumType;
+	m_type = MARKBullNumType;
 }

Modified: trunk/Scribus/scribus/marks.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23441&path=/trunk/Scribus/scribus/marks.h
==============================================================================
--- trunk/Scribus/scribus/marks.h	(original)
+++ trunk/Scribus/scribus/marks.h	Sat Jan 11 02:15:45 2020
@@ -32,7 +32,7 @@
 	TextNote* notePtr {nullptr};
 	//fields used for resolving to pointers for load and copy
 	QString itemName;
-	MarkType markTyp {MARKNoType};
+	MarkType markType {MARKNoType};
 	
 	MarkData() {}
 };
@@ -44,7 +44,7 @@
 	friend class BulNumMark;
 	//only ScribusDoc && ScribusMainWindow can create and delete marks
 private:
-	Mark() : data() {}
+	Mark() : m_data() {}
 	Mark(const Mark& other);
 
 public:
@@ -53,25 +53,25 @@
 
 	void setValues(const QString& l, int p, MarkType t, const MarkData& d);
 
-	MarkType getType() const { return typ; }
-	void setType(MarkType t) { typ = t; }
-	const MarkData getData() const { return data; }
-	void setData(const MarkData d) { data = d; }
-	PageItem* getItemPtr() const { return data.itemPtr; }
-	void setItemPtr( PageItem* ptr ) { data.itemPtr = ptr; }
-	const QString getItemName() const { return data.itemName; }
-	void setItemName( const QString name ) { data.itemName = name; }
+	MarkType getType() const { return m_type; }
+	void setType(MarkType t) { m_type = t; }
+	const MarkData getData() const { return m_data; }
+	void setData(const MarkData d) { m_data = d; }
+	PageItem* getItemPtr() const { return m_data.itemPtr; }
+	void setItemPtr( PageItem* ptr ) { m_data.itemPtr = ptr; }
+	const QString getItemName() const { return m_data.itemName; }
+	void setItemName( const QString name ) { m_data.itemName = name; }
 
 	//for marks to marks - return label and type of target mark by reference
 	void getMark(QString& l, MarkType &t) const;
 	//for marks to marks - set label and type of target mark from mark pointer
 	void setMark(Mark* mP);
 	void setMark(const QString& l, MarkType t);
-	MarkType getMarkType() const { return data.markTyp; }
-	void setMarkType(MarkType t) { data.markTyp = t; }
+	MarkType getMarkType() const { return m_data.markType; }
+	void setMarkType(MarkType t) { m_data.markType = t; }
 	const QString getString() const;
 	void setString(const QString& str );
-	TextNote* getNotePtr() const { return data.notePtr; }
+	TextNote* getNotePtr() const { return m_data.notePtr; }
 	void setNotePtr(TextNote *note);
 
 	bool hasItemPtr() const;
@@ -84,8 +84,8 @@
     virtual ~Mark() {}
 
 protected:
-	MarkType typ {MARKNoType};
-	MarkData data;
+	MarkType m_type {MARKNoType};
+	MarkData m_data;
 };
 
 class SCRIBUS_API BulNumMark : public Mark




More information about the scribus-commit mailing list