summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2009-10-27 20:10:16 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2009-10-27 20:10:16 (GMT)
commit0c751ba9f9a73ad649bf64cef4c9fdb82743b2f6 (patch)
tree7b31e0941321a116a730c80e26726da9202178c3 /addon
parent1042ef3a191bd0f399f1a2a20fe259c14fe6faf9 (diff)
downloadDoxygen-0c751ba9f9a73ad649bf64cef4c9fdb82743b2f6.zip
Doxygen-0c751ba9f9a73ad649bf64cef4c9fdb82743b2f6.tar.gz
Doxygen-0c751ba9f9a73ad649bf64cef4c9fdb82743b2f6.tar.bz2
Release-1.6.1-20091027
Diffstat (limited to 'addon')
-rw-r--r--addon/doxywizard/doxywizard.cpp42
-rw-r--r--addon/doxywizard/expert.cpp3
-rw-r--r--addon/doxywizard/inputstring.cpp12
-rw-r--r--addon/doxywizard/inputstring.h4
-rw-r--r--addon/doxywizard/inputstrlist.h12
5 files changed, 32 insertions, 41 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
index a14aa4e..2001687 100644
--- a/addon/doxywizard/doxywizard.cpp
+++ b/addon/doxywizard/doxywizard.cpp
@@ -85,10 +85,6 @@ MainWindow::MainWindow()
m_launchHtml = new QPushButton(tr("Show HTML output"));
launchLayout->addWidget(m_launchHtml);
-#if 0
- m_launchPdf = new QPushButton(tr("Show PDF output"));
- launchLayout->addWidget(m_launchPdf);
-#endif
launchLayout->addStretch(1);
grid->addLayout(launchLayout,1,0);
runTabLayout->addLayout(grid);
@@ -300,24 +296,12 @@ void MainWindow::loadSettings()
{
QVariant geometry = m_settings.value(QString::fromAscii("main/geometry"), QVariant::Invalid);
QVariant state = m_settings.value(QString::fromAscii("main/state"), QVariant::Invalid);
- //QVariant expState = m_settings.value(QString::fromAscii("expert/state"), QVariant::Invalid);
- //QVariant expState2 = m_settings.value(QString::fromAscii("expert/state2"), QVariant::Invalid);
QVariant wizState = m_settings.value(QString::fromAscii("wizard/state"), QVariant::Invalid);
QVariant loadSettings = m_settings.value(QString::fromAscii("wizard/loadsettings"), QVariant::Invalid);
- //QVariant workingDir = m_settings.value(QString::fromAscii("main/defdir"), QVariant::Invalid);
if (geometry !=QVariant::Invalid) restoreGeometry(geometry.toByteArray());
if (state !=QVariant::Invalid) restoreState (state.toByteArray());
- //if (expState !=QVariant::Invalid) m_expert->restoreState(expState.toByteArray());
- //if (expState2 !=QVariant::Invalid) m_expert->restoreInnerState(expState2.toByteArray());
if (wizState !=QVariant::Invalid) m_wizard->restoreState(wizState.toByteArray());
- //if (workingDir!=QVariant::Invalid)
- //{
- // QString dir = workingDir.toString();
- // m_workingDir->setText(dir);
- // QDir::setCurrent(dir);
- // m_run->setEnabled(!dir.isEmpty());
- //}
if (loadSettings!=QVariant::Invalid && loadSettings.toBool())
{
m_expert->loadSettings(&m_settings);
@@ -337,8 +321,6 @@ void MainWindow::saveSettings()
m_settings.setValue(QString::fromAscii("main/geometry"), saveGeometry());
m_settings.setValue(QString::fromAscii("main/state"), saveState());
- //m_settings.setValue(QString::fromAscii("expert/state"), m_expert->saveState());
- //m_settings.setValue(QString::fromAscii("expert/state2"), m_expert->saveInnerState());
m_settings.setValue(QString::fromAscii("wizard/state"), m_wizard->saveState());
}
@@ -387,15 +369,19 @@ void MainWindow::runDoxygen()
#if defined(Q_OS_MACX)
doxygenPath = qApp->applicationDirPath()+QString::fromAscii("/../Resources/");
qDebug() << tr("Doxygen path: ") << doxygenPath;
- if ( !QFile(doxygenPath + QString::fromAscii("doxygen")).exists() ) {
- // No doygen binary in the resources, if there is a system doxygen binary, use that instead
- if ( QFile(QString::fromAscii("/usr/local/bin/doxygen")).exists() )
- doxygenPath = QString::fromAscii("/usr/local/bin/");
- else {
- qDebug() << tr("Can't find the doxygen command, make sure it's in your $$PATH");
- doxygenPath = QString::fromAscii("");
- }
- }
+ if ( !QFile(doxygenPath + QString::fromAscii("doxygen")).exists() )
+ {
+ // No doygen binary in the resources, if there is a system doxygen binary, use that instead
+ if ( QFile(QString::fromAscii("/usr/local/bin/doxygen")).exists() )
+ {
+ doxygenPath = QString::fromAscii("/usr/local/bin/");
+ }
+ else
+ {
+ qDebug() << tr("Can't find the doxygen command, make sure it's in your $$PATH");
+ doxygenPath = QString::fromAscii("");
+ }
+ }
qDebug() << tr("Getting doxygen from: ") << doxygenPath;
#endif
@@ -423,7 +409,7 @@ void MainWindow::runDoxygen()
QTextStream t(m_runProcess);
m_expert->writeConfig(t,false);
m_runProcess->closeWriteChannel();
-
+
if (m_runProcess->state() == QProcess::NotRunning)
{
m_outputLog->append(QString::fromAscii("*** Failed to run doxygen\n"));
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
index 7c16c28..9b665ca 100644
--- a/addon/doxywizard/expert.cpp
+++ b/addon/doxywizard/expert.cpp
@@ -158,7 +158,8 @@ QWidget *Expert::createTopicWidget(QDomElement &elem)
child.attribute(SA("id")),
child.attribute(SA("defval")),
mode,
- child.attribute(SA("docs"))
+ child.attribute(SA("docs")),
+ child.attribute(SA("abspath"))
);
m_options.insert(
child.attribute(SA("id")),
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
index 7b0aea0..58ace8b 100644
--- a/addon/doxywizard/inputstring.cpp
+++ b/addon/doxywizard/inputstring.cpp
@@ -21,8 +21,10 @@
InputString::InputString( QGridLayout *layout,int &row,
const QString & id, const QString &s,
- StringMode m, const QString &docs )
- : m_default(s), m_sm(m), m_index(0), m_docs(docs), m_id(id)
+ StringMode m, const QString &docs,
+ const QString &absPath )
+ : m_default(s), m_sm(m), m_index(0), m_docs(docs), m_id(id),
+ m_absPath(absPath==QString::fromAscii("1"))
{
m_lab = new HelpLabel(id);
if (m==StringFixed)
@@ -126,7 +128,7 @@ void InputString::browse()
QDir dir(path);
if (!MainWindow::instance().configFileName().isEmpty() && dir.exists())
{
- fileName = dir.relativeFilePath(fileName);
+ fileName = m_absPath ? fileName : dir.relativeFilePath(fileName);
}
setValue(fileName);
}
@@ -140,10 +142,10 @@ void InputString::browse()
QDir dir(path);
if (!MainWindow::instance().configFileName().isEmpty() && dir.exists())
{
- dirName = dir.relativeFilePath(dirName);
+ dirName = m_absPath ? dirName : dir.relativeFilePath(dirName);
}
setValue(dirName);
- }
+ }
}
}
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
index 13efb44..9d69a09 100644
--- a/addon/doxywizard/inputstring.h
+++ b/addon/doxywizard/inputstring.h
@@ -41,7 +41,8 @@ class InputString : public QObject, public Input
InputString( QGridLayout *layout,int &row,
const QString &id, const QString &s,
StringMode m,
- const QString &docs );
+ const QString &docs,
+ const QString &absPath = QString() );
~InputString();
void addValue(QString s);
void setDefault();
@@ -83,6 +84,7 @@ class InputString : public QObject, public Input
QVariant m_value;
QString m_docs;
QString m_id;
+ bool m_absPath;
};
#endif
diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h
index 912f441..24717a9 100644
--- a/addon/doxywizard/inputstrlist.h
+++ b/addon/doxywizard/inputstrlist.h
@@ -33,14 +33,14 @@ class InputStrList : public QObject, public Input
Q_OBJECT
public:
- enum ListMode { ListString = 0,
- ListFile = 1,
- ListDir = 2,
- ListFileDir = ListFile | ListDir
+ enum ListMode { ListString = 0,
+ ListFile = 1,
+ ListDir = 2,
+ ListFileDir = ListFile | ListDir
};
-
+
InputStrList( QGridLayout *layout,int &row,
- const QString &id, const QStringList &sl,
+ const QString &id, const QStringList &sl,
ListMode v, const QString &docs);
void setValue(const QStringList &sl);