From a65b883ee4bf1831f586218430470f0a493bbe5a Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 15 Oct 2021 10:51:39 +0900 Subject: Imported Upstream version 1.8.8 --- addon/doxywizard/doxywizard.cpp | 22 +++++++++++++++------- addon/doxywizard/doxywizard.h | 3 +++ addon/doxywizard/doxywizard.pro.in | 5 ++--- addon/doxywizard/expert.cpp | 22 +++++++++++++++++----- addon/doxywizard/expert.h | 2 ++ addon/doxywizard/inputstring.cpp | 2 +- addon/doxywizard/wizard.cpp | 18 +++++++++++++----- addon/doxywizard/wizard.h | 3 +++ 8 files changed, 56 insertions(+), 21 deletions(-) (limited to 'addon') diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 99310a1..26df065 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -97,15 +97,15 @@ MainWindow::MainWindow() grid->addLayout(launchLayout,1,0); runTabLayout->addLayout(grid); - QTabWidget *tabs = new QTabWidget; - tabs->addTab(m_wizard,tr("Wizard")); - tabs->addTab(m_expert,tr("Expert")); - tabs->addTab(runTab,tr("Run")); + m_tabs = new QTabWidget; + m_tabs->addTab(m_wizard,tr("Wizard")); + m_tabs->addTab(m_expert,tr("Expert")); + m_tabs->addTab(runTab,tr("Run")); rowLayout->addWidget(new QLabel(tr("Step 1: Specify the working directory from which doxygen will run"))); rowLayout->addLayout(dirLayout); rowLayout->addWidget(new QLabel(tr("Step 2: Configure doxygen using the Wizard and/or Expert tab, then switch to the Run tab to generate the documentation"))); - rowLayout->addWidget(tabs); + rowLayout->addWidget(m_tabs); setCentralWidget(topPart); statusBar()->showMessage(tr("Welcome to Doxygen"),messageTimeout); @@ -115,7 +115,7 @@ MainWindow::MainWindow() m_timer = new QTimer; // connect signals and slots - connect(tabs,SIGNAL(currentChanged(int)),SLOT(selectTab(int))); + connect(m_tabs,SIGNAL(currentChanged(int)),SLOT(selectTab(int))); connect(m_selWorkingDir,SIGNAL(clicked()),SLOT(selectWorkingDir())); connect(m_recentMenu,SIGNAL(triggered(QAction*)),SLOT(openRecent(QAction*))); connect(m_workingDir,SIGNAL(returnPressed()),SLOT(updateWorkingDir())); @@ -127,6 +127,8 @@ MainWindow::MainWindow() connect(m_saveLog,SIGNAL(clicked()),SLOT(saveLog())); connect(showSettings,SIGNAL(clicked()),SLOT(showSettings())); connect(m_expert,SIGNAL(changed()),SLOT(configChanged())); + connect(m_wizard,SIGNAL(done()),SLOT(selectRunTab())); + connect(m_expert,SIGNAL(done()),SLOT(selectRunTab())); loadSettings(); updateLaunchButtonState(); @@ -191,7 +193,7 @@ void MainWindow::about() t << QString::fromAscii("
A tool to configure and run doxygen version ")+ QString::fromAscii(versionString)+ QString::fromAscii(" on your source files.


" - "

Written by
Dimitri van Heesch
© 2000-2013

" + "

Written by
Dimitri van Heesch
© 2000-2014

" ""); QMessageBox::about(this,tr("Doxygen GUI"),msg); } @@ -371,6 +373,12 @@ void MainWindow::saveSettings() void MainWindow::selectTab(int id) { if (id==0) m_wizard->refresh(); + else if (id==1) m_expert->refresh(); +} + +void MainWindow::selectRunTab() +{ + m_tabs->setCurrentIndex(2); } void MainWindow::addRecentFile(const QString &fileName) diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h index 46cd748..189972f 100644 --- a/addon/doxywizard/doxywizard.h +++ b/addon/doxywizard/doxywizard.h @@ -14,6 +14,7 @@ class QTextEdit; class QMenu; class QProcess; class QTimer; +class QTabWidget; class MainWindow : public QMainWindow { @@ -51,6 +52,7 @@ class MainWindow : public QMainWindow void showSettings(); void configChanged(); void clearRecent(); + void selectRunTab(); private: MainWindow(); @@ -77,6 +79,7 @@ class MainWindow : public QMainWindow QStringList m_recentFiles; QProcess *m_runProcess; QTimer *m_timer; + QTabWidget *m_tabs; bool m_running; bool m_modified; }; diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index 0c8d049..1ad36a9 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -15,7 +15,7 @@ RCC_DIR = ../../rcc/doxywizard DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII macx-g++ { - CONFIG += x86 + CONFIG += x86 x86_64 } # Input @@ -24,11 +24,10 @@ HEADERS += doxywizard.h version.h expert.h config.h helplabel.h \ SOURCES += doxywizard.cpp expert.cpp wizard.cpp \ inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp RESOURCES += doxywizard.qrc -INCBUFSIZE=$(PYTHON) ../../src/increasebuffer.py win32:RC_FILE += doxywizard.rc config.target = ../../generated_src/doxywizard/config_doxyw.cpp -config.commands = $(LEX) -Pconfig_doxywYY -t ../../addon/doxywizard/config_doxyw.l | $(INCBUFSIZE) >../../generated_src/doxywizard/$*.cpp +config.commands = $(LEX) -Pconfig_doxywYY -t ../../addon/doxywizard/config_doxyw.l | $(PYTHON) ../../src/increasebuffer.py >../../generated_src/doxywizard/$*.cpp config.depends = ../../addon/doxywizard/config_doxyw.l ../../src/increasebuffer.py configdoc.target = ../../generated_src/doxywizard/configdoc.cpp configdoc.commands = $(PYTHON) ../../src/configgen.py -wiz ../../src/config.xml > ../../generated_src/doxywizard/configdoc.cpp diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index fe6609e..1cc5d15 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -683,7 +683,7 @@ void Expert::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *) QWidget *w = m_topics[item->text(0)]; m_topicStack->setCurrentWidget(w); m_prev->setEnabled(m_topicStack->currentIndex()!=0); - m_next->setEnabled(m_topicStack->currentIndex()!=m_topicStack->count()-1); + m_next->setEnabled(true); } } @@ -824,10 +824,17 @@ void Expert::showHelp(Input *option) void Expert::nextTopic() { - m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); - m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); - m_prev->setEnabled(m_topicStack->currentIndex()!=0); - m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); + if (m_topicStack->currentIndex()+1==m_topicStack->count()) // last topic + { + done(); + } + else + { + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); + } } void Expert::prevTopic() @@ -931,3 +938,8 @@ bool Expert::pdfOutputPresent(const QString &workingDir) const return fi.exists() && fi.isFile(); } +void Expert::refresh() +{ + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(0)); +} + diff --git a/addon/doxywizard/expert.h b/addon/doxywizard/expert.h index 2c65446..ff571cb 100644 --- a/addon/doxywizard/expert.h +++ b/addon/doxywizard/expert.h @@ -42,6 +42,7 @@ class Expert : public QSplitter, public DocIntf public slots: void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *); QWidget *createTopicWidget(QDomElement &elem); + void refresh(); private slots: void showHelp(Input *); @@ -50,6 +51,7 @@ class Expert : public QSplitter, public DocIntf signals: void changed(); + void done(); private: void createTopics(const QDomElement &); diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index ad258f7..48ede55 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -167,7 +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_im) m_im->setEnabled(state); if (m_br) m_br->setEnabled(state); if (m_com) m_com->setEnabled(state); updateDefault(); diff --git a/addon/doxywizard/wizard.cpp b/addon/doxywizard/wizard.cpp index 56933e0..a8b7f94 100644 --- a/addon/doxywizard/wizard.cpp +++ b/addon/doxywizard/wizard.cpp @@ -1292,17 +1292,24 @@ void Wizard::activateTopic(QTreeWidgetItem *item,QTreeWidgetItem *) { m_topicStack->setCurrentWidget(m_step4); m_prev->setEnabled(true); - m_next->setEnabled(false); + m_next->setEnabled(true); } } } void Wizard::nextTopic() { - m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); - m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); - m_prev->setEnabled(m_topicStack->currentIndex()!=0); - m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); + if (m_topicStack->currentIndex()+1==m_topicStack->count()) // last topic + { + done(); + } + else + { + m_topicStack->setCurrentIndex(m_topicStack->currentIndex()+1); + m_next->setEnabled(m_topicStack->count()!=m_topicStack->currentIndex()+1); + m_prev->setEnabled(m_topicStack->currentIndex()!=0); + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(m_topicStack->currentIndex())); + } } void Wizard::prevTopic() @@ -1315,6 +1322,7 @@ void Wizard::prevTopic() void Wizard::refresh() { + m_treeWidget->setCurrentItem(m_treeWidget->invisibleRootItem()->child(0)); m_step1->init(); m_step2->init(); m_step3->init(); diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h index a18df62..4d5eb9d 100644 --- a/addon/doxywizard/wizard.h +++ b/addon/doxywizard/wizard.h @@ -238,6 +238,9 @@ class Wizard : public QSplitter void nextTopic(); void prevTopic(); + signals: + void done(); + private: const QHash &m_modelData; QTreeWidget *m_treeWidget; -- cgit v1.2.3