r19486 by jghali - make JavaDocs ScribusDoc and ScribusView members private
scribus-commit
scribus-commit at lists.scribus.net
Sat Sep 6 13:05:29 UTC 2014
Author: jghali
Date: Sat Sep 6 13:05:29 2014
New Revision: 19486
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19486
Log:
make JavaDocs ScribusDoc and ScribusView members private
Modified:
branches/Version14x/Scribus/scribus/javadocs.cpp
branches/Version14x/Scribus/scribus/javadocs.h
Modified: branches/Version14x/Scribus/scribus/javadocs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19486&path=/branches/Version14x/Scribus/scribus/javadocs.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/javadocs.cpp (original)
+++ branches/Version14x/Scribus/scribus/javadocs.cpp Sat Sep 6 13:05:29 2014
@@ -28,8 +28,8 @@
setModal(true);
setWindowTitle( tr( "Edit JavaScripts" ) );
setWindowIcon(loadIcon("AppIcon.png"));
- Doc = doc;
- View = vie;
+ m_Doc = doc;
+ m_View = vie;
JavaDocsLayout = new QHBoxLayout(this);
JavaDocsLayout->setMargin(10);
JavaDocsLayout->setSpacing(5);
@@ -37,7 +37,7 @@
Scripts = new QListWidget( this );
Scripts->setMinimumSize( QSize( 150, 200 ) );
QMap<QString,QString>::Iterator it;
- for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
+ for (it = m_Doc->JavaScripts.begin(); it != m_Doc->JavaScripts.end(); ++it)
Scripts->addItem(it.key());
JavaDocsLayout->addWidget( Scripts );
@@ -59,7 +59,7 @@
ExitDia = new QPushButton( tr( "&Close" ), this);
ExitDia->setDefault( true );
Layout1->addWidget( ExitDia );
- if (Doc->JavaScripts.count() == 0)
+ if (m_Doc->JavaScripts.count() == 0)
{
EditScript->setEnabled(false);
DeleteScript->setEnabled(false);
@@ -79,16 +79,16 @@
QString nam;
Query dia(this, "tt", 1, 0, tr("&New Script:"), tr("New Script"));
dia.setEditText( tr("New Script"), false );
- dia.setTestList(Doc->JavaScripts.keys());
+ dia.setTestList(m_Doc->JavaScripts.keys());
if (dia.exec())
{
nam = dia.getEditText();
nam.replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "_" );
- Editor* dia2 = new Editor(this, "", View);
+ Editor* dia2 = new Editor(this, "", m_View);
dia2->EditTex->setText("function "+nam+"()\n{\n}");
if (dia2->exec())
{
- Doc->JavaScripts[nam] = dia2->EditTex->toPlainText();
+ m_Doc->JavaScripts[nam] = dia2->EditTex->toPlainText();
Scripts->addItem(nam);
Scripts->setCurrentRow(Scripts->count() - 1);
emit docChanged(false);
@@ -103,10 +103,10 @@
if (!currentItem)
return;
QString name = currentItem->text();
- Editor* dia2 = new Editor(this, Doc->JavaScripts[name], View);
+ Editor* dia2 = new Editor(this, m_Doc->JavaScripts[name], m_View);
if (dia2->exec())
{
- Doc->JavaScripts[name] = dia2->EditTex->toPlainText();
+ m_Doc->JavaScripts[name] = dia2->EditTex->toPlainText();
emit docChanged(false);
}
delete dia2;
@@ -125,12 +125,12 @@
if (exit == QMessageBox::Yes)
{
QString name = currentItem->text();
- Doc->JavaScripts.remove(name);
+ m_Doc->JavaScripts.remove(name);
Scripts->clear();
QMap<QString,QString>::Iterator it;
- for (it = Doc->JavaScripts.begin(); it != Doc->JavaScripts.end(); ++it)
+ for (it = m_Doc->JavaScripts.begin(); it != m_Doc->JavaScripts.end(); ++it)
Scripts->addItem(it.key());
- if (Doc->JavaScripts.count() == 0)
+ if (m_Doc->JavaScripts.count() == 0)
{
EditScript->setEnabled(false);
DeleteScript->setEnabled(false);
Modified: branches/Version14x/Scribus/scribus/javadocs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19486&path=/branches/Version14x/Scribus/scribus/javadocs.h
==============================================================================
--- branches/Version14x/Scribus/scribus/javadocs.h (original)
+++ branches/Version14x/Scribus/scribus/javadocs.h Sat Sep 6 13:05:29 2014
@@ -30,8 +30,6 @@
QPushButton* AddScript;
QPushButton* DeleteScript;
QPushButton* ExitDia;
- ScribusDoc *Doc;
- ScribusView *View;
private slots:
void slotAdd();
@@ -43,6 +41,9 @@
void docChanged(bool);
protected:
+ ScribusDoc *m_Doc;
+ ScribusView *m_View;
+
QHBoxLayout* JavaDocsLayout;
QVBoxLayout* Layout1;
};
More information about the scribus-commit
mailing list