summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addon/doxywizard/expert.cpp30
-rw-r--r--addon/doxywizard/inputstring.cpp48
-rw-r--r--addon/doxywizard/inputstring.h4
-rw-r--r--addon/doxywizard/wizard.cpp22
-rw-r--r--doc/changelog.doc2
-rw-r--r--src/config.h2
-rw-r--r--src/config.xml2
-rwxr-xr-xsrc/configgen.py30
-rw-r--r--src/doctokenizer.l10
-rw-r--r--src/index.cpp7
-rw-r--r--src/latexdocvisitor.cpp4
-rw-r--r--src/markdown.cpp4
12 files changed, 142 insertions, 23 deletions
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
index 155498c..fe6609e 100644
--- a/addon/doxywizard/expert.cpp
+++ b/addon/doxywizard/expert.cpp
@@ -323,6 +323,32 @@ static QString getDocsForNode(const QDomElement &child)
}
}
}
+ else if (child.attribute(SA("format")) == SA("image"))
+ {
+ QString abspath = child.attribute(SA("abspath"));
+ if (defval != SA(""))
+ {
+ docs+=SA("<br/>");
+ if (abspath != SA("1"))
+ {
+ docs += SA(" The default image is: <code>") + defval + SA("</code>.");
+ }
+ else
+ {
+ docs += SA(" The default image (with absolute path) is: <code>") + defval + SA("</code>.");
+ }
+ docs += SA("<br/>");
+ }
+ else
+ {
+ if (abspath == SA("1"))
+ {
+ docs+=SA("<br/>");
+ docs += SA(" The image has to be specified with full path.");
+ docs += SA("<br/>");
+ }
+ }
+ }
else // if (child.attribute(SA("format")) == SA("string"))
{
if (defval != SA(""))
@@ -477,6 +503,10 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
{
mode = InputString::StringFile;
}
+ else if (format==SA("image"))
+ {
+ mode = InputString::StringImage;
+ }
else // format=="string"
{
mode = InputString::StringFree;
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
index 913bf93..ad258f7 100644
--- a/addon/doxywizard/inputstring.cpp
+++ b/addon/doxywizard/inputstring.cpp
@@ -44,6 +44,7 @@ InputString::InputString( QGridLayout *layout,int &row,
layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft );
m_le=0;
m_br=0;
+ m_im=0;
row++;
}
else
@@ -51,28 +52,39 @@ InputString::InputString( QGridLayout *layout,int &row,
layout->addWidget( m_lab, row, 0 );
m_le = new QLineEdit;
m_le->setText( s );
+ m_im = 0;
//layout->setColumnMinimumWidth(2,150);
- if (m==StringFile || m==StringDir)
+ if (m==StringFile || m==StringDir || m==StringImage)
{
layout->addWidget( m_le, row, 1 );
m_br = new QToolBar;
m_br->setIconSize(QSize(24,24));
- if (m==StringFile)
+ if (m==StringFile || m==StringImage)
{
QAction *file = m_br->addAction(QIcon(QString::fromAscii(":/images/file.png")),QString(),this,SLOT(browse()));
file->setToolTip(tr("Browse to a file"));
+ layout->addWidget( m_br,row,2 );
+ if (m==StringImage)
+ {
+ m_im = new QLabel;
+ m_im->setMinimumSize(1,55);
+ m_im->setAlignment(Qt::AlignLeft|Qt::AlignTop);
+ row++;
+ layout->addWidget( m_im,row,1 );
+ }
}
else
{
QAction *dir = m_br->addAction(QIcon(QString::fromAscii(":/images/folder.png")),QString(),this,SLOT(browse()));
dir->setToolTip(tr("Browse to a folder"));
+ layout->addWidget( m_br,row,2 );
}
- layout->addWidget( m_br,row,2 );
}
else
{
layout->addWidget( m_le, row, 1, 1, 2 );
m_br=0;
+ m_im=0;
}
m_com=0;
row++;
@@ -119,6 +131,33 @@ void InputString::updateDefault()
{
m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>"));
}
+ if (m_im)
+ {
+ if (m_str.isEmpty())
+ {
+ m_im->setText(tr("No Project logo selected."));
+ }
+ else
+ {
+ QFile Fout(m_str);
+ if(!Fout.exists())
+ {
+ m_im->setText(tr("Sorry, cannot find file(")+m_str+QString::fromAscii(");"));
+ }
+ else
+ {
+ QPixmap pm(m_str);
+ if (!pm.isNull())
+ {
+ m_im->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
+ }
+ else
+ {
+ m_im->setText(tr("Sorry, no preview available (")+m_str+QString::fromAscii(");"));
+ }
+ }
+ }
+ }
if (m_le && m_le->text()!=m_str) m_le->setText( m_str );
emit changed();
}
@@ -128,6 +167,7 @@ void InputString::setEnabled(bool state)
{
m_lab->setEnabled(state);
if (m_le) m_le->setEnabled(state);
+ if (m_im) m_le->setEnabled(state);
if (m_br) m_br->setEnabled(state);
if (m_com) m_com->setEnabled(state);
updateDefault();
@@ -136,7 +176,7 @@ void InputString::setEnabled(bool state)
void InputString::browse()
{
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
- if (m_sm==StringFile)
+ if (m_sm==StringFile || m_sm==StringImage)
{
QString fileName = QFileDialog::getOpenFileName(&MainWindow::instance(),
tr("Select file"),path);
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
index 2b8b099..90ea87d 100644
--- a/addon/doxywizard/inputstring.h
+++ b/addon/doxywizard/inputstring.h
@@ -35,7 +35,8 @@ class InputString : public QObject, public Input
enum StringMode { StringFree=0,
StringFile=1,
StringDir=2,
- StringFixed=3
+ StringFixed=3,
+ StringImage=4
};
InputString( QGridLayout *layout,int &row,
@@ -77,6 +78,7 @@ class InputString : public QObject, public Input
void updateDefault();
QLabel *m_lab;
QLineEdit *m_le;
+ QLabel *m_im;
QToolBar *m_br;
QComboBox *m_com;
QString m_str;
diff --git a/addon/doxywizard/wizard.cpp b/addon/doxywizard/wizard.cpp
index c4cda76..56933e0 100644
--- a/addon/doxywizard/wizard.cpp
+++ b/addon/doxywizard/wizard.cpp
@@ -468,6 +468,7 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w
projVersion->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
// project icon
QLabel *projLogo = new QLabel(this);
+ projLogo->setMinimumSize(1,55);
projLogo->setText(tr("Project logo:"));
projLogo->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
@@ -564,21 +565,28 @@ void Step1::selectProjectIcon()
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
QString iconName = QFileDialog::getOpenFileName(this,
tr("Select project icon/image"),path);
- QFile Fout(iconName);
- if(!Fout.exists())
+ if (iconName.isEmpty())
{
- m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromAscii(");"));
+ m_projIconLab->setText(tr("No Project logo selected."));
}
else
{
- QPixmap pm(iconName);
- if (!pm.isNull())
+ QFile Fout(iconName);
+ if(!Fout.exists())
{
- m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
+ m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromAscii(");"));
}
else
{
- m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromAscii(");"));
+ QPixmap pm(iconName);
+ if (!pm.isNull())
+ {
+ m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation));
+ }
+ else
+ {
+ m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromAscii(");"));
+ }
}
}
updateStringOption(m_modelData,STR_PROJECT_LOGO,iconName);
diff --git a/doc/changelog.doc b/doc/changelog.doc
index d5fe218..24e110f 100644
--- a/doc/changelog.doc
+++ b/doc/changelog.doc
@@ -817,7 +817,7 @@
<li> Additional Inherited Members could turn up empty of all members of
the inherited class were grouped and SUBGROUPING was set to NO.
</ul>
-<\endhtmlonly
+\endhtmlonly
\subsection log_1_8_1 Release 1.8.1
\htmlonly
<a name="1.8.1"></a>
diff --git a/src/config.h b/src/config.h
index 756e94e..505e4d1 100644
--- a/src/config.h
+++ b/src/config.h
@@ -165,7 +165,7 @@ class ConfigEnum : public ConfigOption
class ConfigString : public ConfigOption
{
public:
- enum WidgetType { String, File, Dir };
+ enum WidgetType { String, File, Dir, Image };
ConfigString(const char *name,const char *doc)
: ConfigOption(O_String)
{
diff --git a/src/config.xml b/src/config.xml
index 08f3e14..c832112 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -247,7 +247,7 @@ Go to the <a href="commands.html">next</a> section or return to the
</docs>
</option>
- <option type='string' id='PROJECT_LOGO' format='file' defval=''>
+ <option type='string' id='PROJECT_LOGO' format='image' defval=''>
<docs>
<![CDATA[
With the \c PROJECT_LOGO tag one can specify an logo or icon that is
diff --git a/src/configgen.py b/src/configgen.py
index 4023930..8ec0caa 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -201,6 +201,19 @@ def prepCDocs(node):
else:
if abspath == '1':
doc += "<br/>The file has to be specified with full path."
+ elif file =='image':
+ abspath = node.getAttribute('abspath')
+ if defval != '':
+ if abspath != '1':
+ doc += "<br/>The default image is: <code>%s</code>." % (
+ defval)
+ else:
+ doc += "<br/>%s: %s%s%s." % (
+ "The default image (with absolute path) is",
+ "<code>",defval,"</code>")
+ else:
+ if abspath == '1':
+ doc += "<br/>The image has to be specified with full path."
else: # format == 'string':
if defval != '':
doc += "<br/>The default value is: <code>%s</code>." % (
@@ -262,6 +275,8 @@ def parseOption(node):
print " cs->setDefaultValue(\"%s\");" % (defval)
if format == 'file':
print " cs->setWidgetType(ConfigString::File);"
+ elif format == 'image':
+ print " cs->setWidgetType(ConfigString::Image);"
elif format == 'dir':
print " cs->setWidgetType(ConfigString::Dir);"
if depends != '':
@@ -453,6 +468,21 @@ def parseOptionDoc(node, first):
if abspath == '1':
print ""
print "The file has to be specified with full path."
+ elif file =='image':
+ abspath = node.getAttribute('abspath')
+ if defval != '':
+ print ""
+ if abspath != '1':
+ print "The default image is: <code>%s</code>." % (
+ defval)
+ else:
+ print "%s: %s%s%s." % (
+ "The default image (with absolute path) is",
+ "<code>",defval,"</code>")
+ else:
+ if abspath == '1':
+ print ""
+ print "The image has to be specified with full path."
else: # format == 'string':
if defval != '':
print ""
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index a4e6c4a..7ebe7d3 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -628,7 +628,15 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{LNKWORD2}
QCString tagName(yytext+1);
int index=tagName.find(':');
g_token->name = tagName.left(index+1);
- g_token->text = tagName.mid(index+2,tagName.length()-index-3);
+ int text_begin = index+2;
+ int text_end = tagName.length()-1;
+ if (tagName[text_begin-1]==':') /* check for Subversion fixed-length keyword */
+ {
+ ++text_begin;
+ if (tagName[text_end-1]=='#')
+ --text_end;
+ }
+ g_token->text = tagName.mid(text_begin,text_end-text_begin);
return TK_RCSTAG;
}
<St_Para,St_HtmlOnly>"$("{ID}")" { /* environment variable */
diff --git a/src/index.cpp b/src/index.cpp
index 9bbc4a4..2013a7c 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -3173,9 +3173,10 @@ static void writePageIndex(OutputList &ol)
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
- if (pd->getOuterScope()==0 ||
- pd->getOuterScope()->definitionType()!=Definition::TypePage
- ) // not a sub page
+ if ((pd->getOuterScope()==0 ||
+ pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
+ !pd->isReference() // not an external page
+ )
{
writePages(pd,ftv);
}
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index aefcac3..c9f2f91 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1469,13 +1469,13 @@ void LatexDocVisitor::visitPost(DocText *)
void LatexDocVisitor::visitPre(DocHtmlBlockQuote *)
{
if (m_hide) return;
- m_t << "\\begin{quotation}" << endl;
+ m_t << "\\begin{quote}" << endl;
}
void LatexDocVisitor::visitPost(DocHtmlBlockQuote *)
{
if (m_hide) return;
- m_t << "\\end{quotation}" << endl;
+ m_t << "\\end{quote}" << endl;
}
void LatexDocVisitor::visitPre(DocVhdlFlow *)
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 9605f31..e17b689 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1770,7 +1770,7 @@ static int writeBlockQuote(GrowBuf &out,const char *data,int size)
{
for (l=level;l<curLevel;l++)
{
- out.addStr("\n</blockquote>\n");
+ out.addStr("</blockquote>\n");
}
}
curLevel=level;
@@ -1783,7 +1783,7 @@ static int writeBlockQuote(GrowBuf &out,const char *data,int size)
// end of comment within blockquote => add end markers
for (l=0;l<curLevel;l++)
{
- out.addStr("\n</blockquote>\n");
+ out.addStr("</blockquote>\n");
}
return i;
}