summaryrefslogtreecommitdiff
path: root/addon
diff options
context:
space:
mode:
Diffstat (limited to 'addon')
-rw-r--r--addon/doxyapp/CMakeLists.txt9
-rw-r--r--addon/doxyapp/doxyapp.cpp26
-rw-r--r--addon/doxywizard/CMakeLists.txt2
-rwxr-xr-x[-rw-r--r--]addon/doxywizard/doxywizard.cpp41
-rwxr-xr-x[-rw-r--r--]addon/doxywizard/doxywizard.h6
5 files changed, 57 insertions, 27 deletions
diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt
index 99a6fd4..423aea6 100644
--- a/addon/doxyapp/CMakeLists.txt
+++ b/addon/doxyapp/CMakeLists.txt
@@ -1,9 +1,18 @@
if (build_app)
+# configvalues.h
+add_custom_command(
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
+ OUTPUT ${GENERATED_SRC}/configvalues.h
+)
+set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1)
+
find_package(Iconv)
include_directories(
${CMAKE_SOURCE_DIR}/src
+ ${GENERATED_SRC}
${CMAKE_SOURCE_DIR}/qtools
${ICONV_INCLUDE_DIR}
${CLANG_INCLUDEDIR}
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp
index 6564981..45e71fc 100644
--- a/addon/doxyapp/doxyapp.cpp
+++ b/addon/doxyapp/doxyapp.cpp
@@ -262,28 +262,28 @@ int main(int argc,char **argv)
// setup the non-default configuration options
// we need a place to put intermediate files
- Config_getString("OUTPUT_DIRECTORY")="/tmp/doxygen";
+ Config_getString(OUTPUT_DIRECTORY)="/tmp/doxygen";
// disable html output
- Config_getBool("GENERATE_HTML")=FALSE;
+ Config_getBool(GENERATE_HTML)=FALSE;
// disable latex output
- Config_getBool("GENERATE_LATEX")=FALSE;
+ Config_getBool(GENERATE_LATEX)=FALSE;
// be quiet
- Config_getBool("QUIET")=TRUE;
+ Config_getBool(QUIET)=TRUE;
// turn off warnings
- Config_getBool("WARNINGS")=FALSE;
- Config_getBool("WARN_IF_UNDOCUMENTED")=FALSE;
- Config_getBool("WARN_IF_DOC_ERROR")=FALSE;
+ Config_getBool(WARNINGS)=FALSE;
+ Config_getBool(WARN_IF_UNDOCUMENTED)=FALSE;
+ Config_getBool(WARN_IF_DOC_ERROR)=FALSE;
// Extract as much as possible
- Config_getBool("EXTRACT_ALL")=TRUE;
- Config_getBool("EXTRACT_STATIC")=TRUE;
- Config_getBool("EXTRACT_PRIVATE")=TRUE;
- Config_getBool("EXTRACT_LOCAL_METHODS")=TRUE;
+ Config_getBool(EXTRACT_ALL)=TRUE;
+ Config_getBool(EXTRACT_STATIC)=TRUE;
+ Config_getBool(EXTRACT_PRIVATE)=TRUE;
+ Config_getBool(EXTRACT_LOCAL_METHODS)=TRUE;
// Extract source browse information, needed
// to make doxygen gather the cross reference info
- Config_getBool("SOURCE_BROWSER")=TRUE;
+ Config_getBool(SOURCE_BROWSER)=TRUE;
// set the input
- Config_getList("INPUT").append(argv[1]);
+ Config_getList(INPUT).append(argv[1]);
// check and finialize the configuration
checkConfiguration();
diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt
index bf2eda8..973d2d1 100644
--- a/addon/doxywizard/CMakeLists.txt
+++ b/addon/doxywizard/CMakeLists.txt
@@ -76,7 +76,7 @@ OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp
)
set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)
-FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "$(LEX_FLAGS) -Pconfig_doxywYY")
+FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "${LEX_FLAGS} -Pconfig_doxywYY")
qt_wrap_cpp(doxywizard_MOC
doxywizard.h
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
index e292d0c..492912b 100644..100755
--- a/addon/doxywizard/doxywizard.cpp
+++ b/addon/doxywizard/doxywizard.cpp
@@ -10,7 +10,7 @@
#include <QVBoxLayout>
#include <QLineEdit>
#include <QLabel>
-#include <QTextEdit>
+#include <QTextBrowser>
#include <QStatusBar>
#include <QProcess>
#include <QTimer>
@@ -31,6 +31,10 @@
const int messageTimeout = 5000; //!< status bar message timeout in milliseconds.
+#define APPQT(x) QString::fromLatin1("<qt><pre>") + x + QString::fromLatin1("</pre></qt>")
+
+static QString text1 = QString::fromLatin1("");
+
MainWindow &MainWindow::instance()
{
static MainWindow *theInstance = new MainWindow;
@@ -101,7 +105,9 @@ MainWindow::MainWindow()
runTabLayout->addLayout(runLayout);
runTabLayout->addWidget(new QLabel(tr("Output produced by doxygen")));
QGridLayout *grid = new QGridLayout;
- m_outputLog = new QTextEdit;
+ //m_outputLog = new QTextEdit;
+ m_outputLog = new QTextBrowser;
+ //m_outputLog = new QPlainTextEdit;
m_outputLog->setReadOnly(true);
m_outputLog->setFontFamily(QString::fromLatin1("courier"));
m_outputLog->setMinimumWidth(600);
@@ -368,14 +374,16 @@ void MainWindow::loadSettings()
}
}
- for (int i=0;i<MAX_RECENT_FILES;i++)
+ /* due to prepend use list in reversed order */
+ for (int i=MAX_RECENT_FILES;i>=0;i--)
{
QString entry = m_settings.value(QString().sprintf("recent/config%d",i)).toString();
if (!entry.isEmpty() && QFileInfo(entry).exists())
{
- addRecentFile(entry);
+ addRecentFileList(entry);
}
}
+ updateRecentFile();
}
@@ -402,6 +410,11 @@ void MainWindow::selectRunTab()
void MainWindow::addRecentFile(const QString &fileName)
{
+ addRecentFileList(fileName);
+ updateRecentFile();
+}
+void MainWindow::addRecentFileList(const QString &fileName)
+{
int i=m_recentFiles.indexOf(fileName);
if (i!=-1) m_recentFiles.removeAt(i);
@@ -415,8 +428,11 @@ void MainWindow::addRecentFile(const QString &fileName)
m_recentFiles.removeLast();
m_recentFiles.prepend(fileName);
}
+}
+void MainWindow::updateRecentFile(void)
+{
m_recentMenu->clear();
- i=0;
+ int i=0;
foreach( QString str, m_recentFiles )
{
m_recentMenu->addAction(str);
@@ -474,11 +490,12 @@ void MainWindow::runDoxygen()
args << QString::fromLatin1("-"); // read config from stdin
m_outputLog->clear();
+ text1 = QString::fromLatin1("");
m_runProcess->start(doxygenPath + QString::fromLatin1("doxygen"), args);
if (!m_runProcess->waitForStarted())
{
- m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n"));
+ m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
return;
}
QTextStream t(m_runProcess);
@@ -487,7 +504,7 @@ void MainWindow::runDoxygen()
if (m_runProcess->state() == QProcess::NotRunning)
{
- m_outputLog->append(QString::fromLatin1("*** Failed to run doxygen\n"));
+ m_outputLog->append(APPQT(QString::fromLatin1("*** Failed to run doxygen\n")));
}
else
{
@@ -517,7 +534,9 @@ void MainWindow::readStdout()
QString text = QString::fromUtf8(data);
if (!text.isEmpty())
{
- m_outputLog->append(text.trimmed());
+ text1 += text;
+ m_outputLog->clear();
+ m_outputLog->append(APPQT(text1.trimmed()));
}
}
}
@@ -526,11 +545,11 @@ void MainWindow::runComplete()
{
if (m_running)
{
- m_outputLog->append(tr("*** Doxygen has finished\n"));
+ m_outputLog->append(APPQT(tr("*** Doxygen has finished\n")));
}
else
{
- m_outputLog->append(tr("*** Cancelled by user\n"));
+ m_outputLog->append(APPQT(tr("*** Cancelled by user\n")));
}
m_outputLog->ensureCursorVisible();
m_run->setText(tr("Run doxygen"));
@@ -592,7 +611,7 @@ void MainWindow::showSettings()
QTextStream t(&text);
m_expert->writeConfig(t,true);
m_outputLog->clear();
- m_outputLog->append(text);
+ m_outputLog->append(APPQT(text));
m_outputLog->ensureCursorVisible();
m_saveLog->setEnabled(true);
}
diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h
index 189972f..49b7c02 100644..100755
--- a/addon/doxywizard/doxywizard.h
+++ b/addon/doxywizard/doxywizard.h
@@ -10,7 +10,7 @@ class Wizard;
class QLabel;
class QLineEdit;
class QPushButton;
-class QTextEdit;
+class QTextBrowser;
class QMenu;
class QProcess;
class QTimer;
@@ -58,6 +58,8 @@ class MainWindow : public QMainWindow
MainWindow();
void saveConfig(const QString &fileName);
void addRecentFile(const QString &fileName);
+ void addRecentFileList(const QString &fileName);
+ void updateRecentFile(void);
void updateConfigFileName(const QString &fileName);
void setWorkingDir(const QString &dirName);
void updateLaunchButtonState();
@@ -69,7 +71,7 @@ class MainWindow : public QMainWindow
QPushButton *m_saveLog;
QPushButton *m_launchHtml;
QPushButton *m_launchPdf;
- QTextEdit *m_outputLog;
+ QTextBrowser *m_outputLog;
QLabel *m_runStatus;
Expert *m_expert;
Wizard *m_wizard;