r17830 by craig - Rename some marks classes

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 27 16:57:05 UTC 2012


Author: craig
Date: Sat Oct 27 16:57:05 2012
New Revision: 17830

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17830
Log:
Rename some marks classes

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/ui/mark2item.cpp
    trunk/Scribus/scribus/ui/mark2item.h
    trunk/Scribus/scribus/ui/mark2mark.cpp
    trunk/Scribus/scribus/ui/mark2mark.h
    trunk/Scribus/scribus/ui/markanchor.cpp
    trunk/Scribus/scribus/ui/markanchor.h
    trunk/Scribus/scribus/ui/markinsert.h
    trunk/Scribus/scribus/ui/marknote.cpp
    trunk/Scribus/scribus/ui/marknote.h
    trunk/Scribus/scribus/ui/markvariabletext.cpp
    trunk/Scribus/scribus/ui/markvariabletext.h

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Oct 27 16:57:05 2012
@@ -10616,7 +10616,7 @@
 			currItem->asTextFrame()->deleteSelectedTextFromFrame();
 		}
 		ScItemsState* is = NULL;
-		if (insertMarkDlg(currItem->asTextFrame(), mType, is))
+		if (insertMarkDialog(currItem->asTextFrame(), mType, is))
 		{
 			Mark* mrk = currItem->itemText.item(currItem->itemText.cursorPosition() -1)->mark;
 			view->updatesOn(false);
@@ -10756,29 +10756,29 @@
 		insertMark(MARKNoteMasterType);
 }
 
-bool ScribusMainWindow::insertMarkDlg(PageItem_TextFrame* currItem, MarkType mrkType, ScItemsState* &is)
+bool ScribusMainWindow::insertMarkDialog(PageItem_TextFrame* currItem, MarkType mrkType, ScItemsState* &is)
 {
 	if (doc->masterPageMode() && (mrkType != MARKVariableTextType))
 		//avoid inserting in master pages other marks than Variable Text
 		return false;
 	
-	MarkInsertDlg* insertMDialog = NULL;
+	MarkInsert* insertMDialog = NULL;
 	switch (mrkType)
 	{
 	case MARKAnchorType:
-		insertMDialog = (MarkInsertDlg*) new MarkAnchorDlg(this);
+		insertMDialog = (MarkInsert*) new MarkAnchor(this);
 		break;
 	case MARKVariableTextType:
-			insertMDialog = (MarkInsertDlg*) new MarkVariableTextDlg(doc->marksList(), this);
+		insertMDialog = (MarkInsert*) new MarkVariableText(doc->marksList(), this);
 		break;
 	case MARK2ItemType:
-		insertMDialog = (MarkInsertDlg*) new Mark2ItemDlg(this);
+		insertMDialog = (MarkInsert*) new Mark2Item(this);
 		break;
 	case MARK2MarkType:
-			insertMDialog = (MarkInsertDlg*) new Mark2MarkDlg(doc->marksList(), NULL, this);
+		insertMDialog = (MarkInsert*) new Mark2Mark(doc->marksList(), NULL, this);
 		break;
 	case MARKNoteMasterType:
-		insertMDialog = (MarkInsertDlg*) new MarkNoteDlg(doc->m_docNotesStylesList, this);
+		insertMDialog = (MarkInsert*) new MarkNote(doc->m_docNotesStylesList, this);
 		break;
 	case MARKIndexType:
 		break;
@@ -10841,7 +10841,7 @@
 			d.destmarkType = mrkPtr->getType();
 			break;
 		case MARKNoteMasterType:
-			//gets pointer to choosed notes style
+			//gets pointer to chosen notes style
 			NStyle = insertMDialog->values();
 			if (NStyle == NULL)
 				return false;
@@ -10956,29 +10956,29 @@
 
 bool ScribusMainWindow::editMarkDlg(Mark *mrk, PageItem_TextFrame* currItem)
 {
-	MarkInsertDlg* editMDialog = NULL;
+	MarkInsert* editMDialog = NULL;
 	switch (mrk->getType())
 	{
 		case MARKAnchorType:
-			editMDialog = (MarkInsertDlg*) new MarkAnchorDlg(this);
+			editMDialog = (MarkInsert*) new MarkAnchor(this);
 			editMDialog->setValues(mrk->label);
 			break;
 		case MARKVariableTextType:
 			if (currItem == NULL)
 				//invoked from Marks Manager
-				editMDialog = (MarkInsertDlg*) new MarkVariableTextDlg(mrk, this);
+				editMDialog = (MarkInsert*) new MarkVariableText(mrk, this);
 			else
 				//invoked from mark`s entry in text
-				editMDialog = (MarkInsertDlg*) new MarkVariableTextDlg(doc->marksList(), this);
+				editMDialog = (MarkInsert*) new MarkVariableText(doc->marksList(), this);
 			editMDialog->setValues(mrk->label, mrk->getString());
 			break;
 		case MARK2ItemType:
-			editMDialog = (MarkInsertDlg*) new Mark2ItemDlg(this);
+			editMDialog = (MarkInsert*) new Mark2Item(this);
 			editMDialog->setValues(mrk->label, mrk->getItemPtr());
 			break;
 		case MARK2MarkType:
 			{
-			editMDialog = (MarkInsertDlg*) new Mark2MarkDlg(doc->marksList(), mrk, this);
+			editMDialog = (MarkInsert*) new Mark2Mark(doc->marksList(), mrk, this);
 				QString l;
 				MarkType t;
 				mrk->getMark(l,t);

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Sat Oct 27 16:57:05 2012
@@ -630,7 +630,7 @@
 	QString osgFilterString;
 
 	void insertMark(MarkType);
-	bool insertMarkDlg(PageItem_TextFrame* item, MarkType mT, ScItemsState* &is);
+	bool insertMarkDialog(PageItem_TextFrame* item, MarkType mT, ScItemsState* &is);
 	int m_marksCount; //remember marks count from last call
 };
 

Modified: trunk/Scribus/scribus/ui/mark2item.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/mark2item.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mark2item.cpp (original)
+++ trunk/Scribus/scribus/ui/mark2item.cpp Sat Oct 27 16:57:05 2012
@@ -2,7 +2,7 @@
 #include "pageitem_noteframe.h"
 #include "scribus.h"
 
-Mark2ItemDlg::Mark2ItemDlg(QWidget *parent) : MarkInsertDlg(parent)
+Mark2Item::Mark2Item(QWidget *parent) : MarkInsert(parent)
 {
 	setupUi(this);
 	ScribusMainWindow* scmw = (ScribusMainWindow*) parent;
@@ -19,7 +19,7 @@
 	setWindowTitle(tr("Mark to Item"));
 }
 
-void Mark2ItemDlg::values(QString &label, PageItem* &ptr)
+void Mark2Item::values(QString &label, PageItem* &ptr)
 {
 	QString itemName = ItemList->currentText();
 	if (itemName != "")
@@ -30,14 +30,14 @@
 	}
 }
 
-void Mark2ItemDlg::setValues(const QString label, const PageItem* ptr)
+void Mark2Item::setValues(const QString label, const PageItem* ptr)
 {
 	int index = (ptr == NULL)? -1:ItemList->findText(ptr->itemName());
 	ItemList->setCurrentIndex(index);
 	labelEdit->setText(label);
 }
 
-void Mark2ItemDlg::changeEvent(QEvent *e)
+void Mark2Item::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
     switch (e->type()) {

Modified: trunk/Scribus/scribus/ui/mark2item.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/mark2item.h
==============================================================================
--- trunk/Scribus/scribus/ui/mark2item.h (original)
+++ trunk/Scribus/scribus/ui/mark2item.h Sat Oct 27 16:57:05 2012
@@ -4,12 +4,12 @@
 #include "markinsert.h"
 #include "ui_mark2item.h"
 
-class SCRIBUS_API Mark2ItemDlg : public MarkInsertDlg, private Ui::Mark2ItemDlg
+class SCRIBUS_API Mark2Item : public MarkInsert, private Ui::Mark2ItemDlg
 {
     Q_OBJECT
 
 public:
-	explicit Mark2ItemDlg(QWidget *parent = 0);
+	explicit Mark2Item(QWidget *parent = 0);
 	virtual void values(QString &label, PageItem* &ptr);
 	virtual void setValues(const QString label, const PageItem* ptr);
 

Modified: trunk/Scribus/scribus/ui/mark2mark.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/mark2mark.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mark2mark.cpp (original)
+++ trunk/Scribus/scribus/ui/mark2mark.cpp Sat Oct 27 16:57:05 2012
@@ -2,7 +2,7 @@
 #include "mark2mark.h"
 #include <QStandardItemModel>
 
-Mark2MarkDlg::Mark2MarkDlg(const QList<Mark*>& marks, Mark* omitMark, QWidget *parent) : MarkInsertDlg(marks, parent)
+Mark2Mark::Mark2Mark(const QList<Mark*>& marks, Mark* omitMark, QWidget *parent) : MarkInsert(marks, parent)
 {
 	setupUi(this);
 	LabelList->addItem("", QVariant::fromValue((void*) NULL));
@@ -71,7 +71,7 @@
 	setWindowTitle(tr("Mark to Mark"));
 }
 
-void Mark2MarkDlg::values(QString& label, Mark* &mrk)
+void Mark2Mark::values(QString& label, Mark* &mrk)
 {
 	label = this->labelEdit->text();
 	int labelID = LabelList->currentIndex();
@@ -81,14 +81,14 @@
 		mrk = (Mark*) LabelList->itemData(labelID).value<void*>();
 }
 
-void Mark2MarkDlg::setValues(const QString label, const Mark* mrk)
+void Mark2Mark::setValues(const QString label, const Mark* mrk)
 {
 	int index = (mrk == NULL)? -1:LabelList->findText(mrk->label);
 	LabelList->setCurrentIndex(index);
 	labelEdit->setText(label);
 }
 
-void Mark2MarkDlg::changeEvent(QEvent *e)
+void Mark2Mark::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
     switch (e->type()) {

Modified: trunk/Scribus/scribus/ui/mark2mark.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/mark2mark.h
==============================================================================
--- trunk/Scribus/scribus/ui/mark2mark.h (original)
+++ trunk/Scribus/scribus/ui/mark2mark.h Sat Oct 27 16:57:05 2012
@@ -4,12 +4,12 @@
 #include "markinsert.h"
 #include "ui_mark2mark.h"
 
-class SCRIBUS_API Mark2MarkDlg : public MarkInsertDlg, private Ui::Mark2MarkDlg
+class SCRIBUS_API Mark2Mark : public MarkInsert, private Ui::Mark2MarkDlg
 {
     Q_OBJECT
 
 public:
-	explicit Mark2MarkDlg(const QList<Mark*>& marks, Mark* omitMark = NULL, QWidget *parent = NULL);
+	explicit Mark2Mark(const QList<Mark*>& marks, Mark* omitMark = NULL, QWidget *parent = NULL);
 	virtual void values(QString& label, Mark* &mrk);
 	virtual void setValues(const QString label, const Mark* mrk);
 

Modified: trunk/Scribus/scribus/ui/markanchor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/markanchor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/markanchor.cpp (original)
+++ trunk/Scribus/scribus/ui/markanchor.cpp Sat Oct 27 16:57:05 2012
@@ -1,26 +1,27 @@
 #include "markanchor.h"
 
-MarkAnchorDlg::MarkAnchorDlg(QWidget *parent) :
-	MarkInsertDlg(parent)
+MarkAnchor::MarkAnchor(QWidget *parent) :
+	MarkInsert(parent)
 {
 	setupUi(this);
 	setWindowTitle(tr("Anchor Mark"));
 }
 
-void MarkAnchorDlg:: values(QString& label)
+void MarkAnchor:: values(QString& label)
 {
 	label = labelEdit->text();
 }
 
-void MarkAnchorDlg::setValues(const QString label)
+void MarkAnchor::setValues(const QString label)
 {
 	labelEdit->setText(label);
 }
 
-void MarkAnchorDlg::changeEvent(QEvent *e)
+void MarkAnchor::changeEvent(QEvent *e)
 {
 	QDialog::changeEvent(e);
-	switch (e->type()) {
+	switch (e->type())
+	{
 		case QEvent::LanguageChange:
 			retranslateUi(this);
 			break;

Modified: trunk/Scribus/scribus/ui/markanchor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/markanchor.h
==============================================================================
--- trunk/Scribus/scribus/ui/markanchor.h (original)
+++ trunk/Scribus/scribus/ui/markanchor.h Sat Oct 27 16:57:05 2012
@@ -4,13 +4,13 @@
 #include "markinsert.h"
 #include "ui_markanchor.h"
 
-class SCRIBUS_API MarkAnchorDlg : public MarkInsertDlg, private Ui::MarkAnchorDlg
+class SCRIBUS_API MarkAnchor : public MarkInsert, private Ui::MarkAnchorDlg
 {
     Q_OBJECT
 
 public:
-	explicit MarkAnchorDlg(QWidget *parent = 0);
-	~MarkAnchorDlg() {}
+	explicit MarkAnchor(QWidget *parent = 0);
+	~MarkAnchor() {}
 	virtual void values(QString& label);
 	virtual void setValues(const QString label);
 protected:

Modified: trunk/Scribus/scribus/ui/markinsert.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/markinsert.h
==============================================================================
--- trunk/Scribus/scribus/ui/markinsert.h (original)
+++ trunk/Scribus/scribus/ui/markinsert.h Sat Oct 27 16:57:05 2012
@@ -1,5 +1,5 @@
-#ifndef MARKINSERTDLG_H
-#define MARKINSERTDLG_H
+#ifndef MARKINSERT_H
+#define MARKINSERT_H
 
 #include <QDialog>
 #include <scribusapi.h>
@@ -8,16 +8,16 @@
 class Mark;
 class PageItem;
 
-class SCRIBUS_API MarkInsertDlg : public QDialog
+class SCRIBUS_API MarkInsert : public QDialog
 {
 	Q_OBJECT
 
 public:
-	MarkInsertDlg(const QList<Mark*>&, QWidget *parent = 0) : QDialog(parent) {}
-	MarkInsertDlg(const Mark*, QWidget *parent = 0) : QDialog(parent) {}
-	MarkInsertDlg(const QList<NotesStyle*>&, QWidget *parent = 0) : QDialog(parent) {}
-	MarkInsertDlg(QWidget *parent = 0) : QDialog(parent) {}
-	~MarkInsertDlg() {}
+	MarkInsert(const QList<Mark*>&, QWidget *parent = 0) : QDialog(parent) {}
+	MarkInsert(const Mark*, QWidget *parent = 0) : QDialog(parent) {}
+	MarkInsert(const QList<NotesStyle*>&, QWidget *parent = 0) : QDialog(parent) {}
+	MarkInsert(QWidget *parent = 0) : QDialog(parent) {}
+	~MarkInsert() {}
 
 	virtual void values(QString &label) {}
 	virtual void values(QString &label, PageItem* &item) {}
@@ -37,4 +37,4 @@
 
 };
 
-#endif // MARKINSERTDLG_H
+#endif // MARKINSERT_H

Modified: trunk/Scribus/scribus/ui/marknote.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/marknote.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marknote.cpp (original)
+++ trunk/Scribus/scribus/ui/marknote.cpp Sat Oct 27 16:57:05 2012
@@ -3,8 +3,8 @@
 
 static int lastNotesStyleIndex = 0;  //remember last selected notes style
 
-MarkNoteDlg::MarkNoteDlg(const QList<NotesStyle*>& notesStylesList, QWidget *parent) :
-	MarkInsertDlg(notesStylesList, parent)
+MarkNote::MarkNote(const QList<NotesStyle*>& notesStylesList, QWidget *parent) :
+	MarkInsert(notesStylesList, parent)
 {
 	setupUi(this);
 
@@ -14,18 +14,18 @@
 	ItemList->setCurrentIndex(lastNotesStyleIndex);
 }
 
-NotesStyle* MarkNoteDlg::values()
+NotesStyle* MarkNote::values()
 {
 	int index = ItemList->currentIndex();
 	return (NotesStyle*) ItemList->itemData(index).value<void*>();
 }
 
-void MarkNoteDlg::setValues(NotesStyle* defaultStyle)
+void MarkNote::setValues(NotesStyle* defaultStyle)
 {
 	ItemList->setCurrentIndex(ItemList->findText(defaultStyle->name()));
 }
 
-void MarkNoteDlg::changeEvent(QEvent *e)
+void MarkNote::changeEvent(QEvent *e)
 {
 	QDialog::changeEvent(e);
 	switch (e->type()) {
@@ -37,7 +37,7 @@
 	}
 }
 
-void MarkNoteDlg::on_buttonBox_accepted()
+void MarkNote::on_buttonBox_accepted()
 {
 	lastNotesStyleIndex = ItemList->currentIndex();
 }

Modified: trunk/Scribus/scribus/ui/marknote.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/marknote.h
==============================================================================
--- trunk/Scribus/scribus/ui/marknote.h (original)
+++ trunk/Scribus/scribus/ui/marknote.h Sat Oct 27 16:57:05 2012
@@ -5,12 +5,12 @@
 #include "notesstyles.h"
 #include "ui_marknote.h"
 
-class SCRIBUS_API MarkNoteDlg : public MarkInsertDlg, private Ui::MarkNoteDlg
+class SCRIBUS_API MarkNote : public MarkInsert, private Ui::MarkNoteDlg
 {
 	Q_OBJECT
 	
 public:
-	explicit MarkNoteDlg(const QList<NotesStyle*>& notesStylesList, QWidget *parent = NULL);
+	explicit MarkNote(const QList<NotesStyle*>& notesStylesList, QWidget *parent = NULL);
 	virtual NotesStyle* values();
 	virtual void setValues(NotesStyle* defaultStyle);
 protected:

Modified: trunk/Scribus/scribus/ui/markvariabletext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/markvariabletext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/markvariabletext.cpp (original)
+++ trunk/Scribus/scribus/ui/markvariabletext.cpp Sat Oct 27 16:57:05 2012
@@ -2,7 +2,7 @@
 #include "marks.h"
 #include <QComboBox>
 
-MarkVariableTextDlg::MarkVariableTextDlg(const QList<Mark*>& marks, QWidget *parent) : MarkInsertDlg(marks, parent)
+MarkVariableText::MarkVariableText(const QList<Mark*>& marks, QWidget *parent) : MarkInsert(marks, parent)
 {
 	//for editing mark entry in text - user can change mark pointer inserted into text or create new mark entry
 	setupUi(this);
@@ -22,7 +22,7 @@
 	setWindowTitle(tr("Mark with Variable Text"));
 }
 
-MarkVariableTextDlg::MarkVariableTextDlg(const Mark* mark, QWidget *parent) : MarkInsertDlg(mark, parent), mrk(mark)
+MarkVariableText::MarkVariableText(const Mark* mark, QWidget *parent) : MarkInsert(mark, parent), mrk(mark)
 {
 	//for editing by marks Manager - user can change label and variable text
 	setupUi(this);
@@ -35,13 +35,13 @@
 	setWindowTitle(tr("Mark with Variable Text"));
 }
 
-MarkVariableTextDlg::~MarkVariableTextDlg()
+MarkVariableText::~MarkVariableText()
 {
 	//delete ui;
 	delete labelEditWidget;
 }
 
-Mark* MarkVariableTextDlg::values(QString& label, QString& text)
+Mark* MarkVariableText::values(QString& label, QString& text)
 {
 	text = textEdit->text();
 	//hack to read if it is QComboBox or QLineEdit
@@ -59,7 +59,7 @@
 	return const_cast<Mark*> (mrk);
 }
 
-void MarkVariableTextDlg::setValues(QString label, QString text)
+void MarkVariableText::setValues(QString label, QString text)
 {
 	if (labelEditWidget->toolTip() == tr("Edit selected Mark`s label."))
 		((QLineEdit*) labelEditWidget)->setText(label);
@@ -68,7 +68,7 @@
 	textEdit->setText(text);
 }
 
-void MarkVariableTextDlg::changeEvent(QEvent *e)
+void MarkVariableText::changeEvent(QEvent *e)
 {
 	QDialog::changeEvent(e);
 	switch (e->type()) {
@@ -80,7 +80,7 @@
 	}
 }
 
-void MarkVariableTextDlg::onLabelList_currentIndexChanged(int index)
+void MarkVariableText::onLabelList_currentIndexChanged(int index)
 {
 	if (index > 0)
 	{

Modified: trunk/Scribus/scribus/ui/markvariabletext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17830&path=/trunk/Scribus/scribus/ui/markvariabletext.h
==============================================================================
--- trunk/Scribus/scribus/ui/markvariabletext.h (original)
+++ trunk/Scribus/scribus/ui/markvariabletext.h Sat Oct 27 16:57:05 2012
@@ -5,13 +5,13 @@
 #include "markinsert.h"
 #include "ui_markvariabletext.h"
 
-class SCRIBUS_API MarkVariableTextDlg : public MarkInsertDlg, private Ui::MarkVariableTextDlg
+class SCRIBUS_API MarkVariableText : public MarkInsert, private Ui::MarkVariableTextDlg
 {
 	Q_OBJECT
 public:
-	explicit MarkVariableTextDlg(const QList<Mark*>&, QWidget *parent = 0);
-	explicit MarkVariableTextDlg(const Mark*, QWidget *parent = 0);
-	~MarkVariableTextDlg();
+	explicit MarkVariableText(const QList<Mark*>&, QWidget *parent = 0);
+	explicit MarkVariableText(const Mark*, QWidget *parent = 0);
+	~MarkVariableText();
 	virtual Mark* values(QString& label, QString& text);
 	virtual void setValues(const QString label, const QString text);
 protected:




More information about the scribus-commit mailing list