diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-05-03 19:32:48 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-05-03 19:32:48 (GMT) |
commit | 2277e6e695d785d319cb52a8a8ead2982eac2afa (patch) | |
tree | b183195709af0628833f7499613e0a0317471029 | |
parent | fbc60af2298c2668893e2f7045f66765f8e0c63f (diff) | |
download | Doxygen-2277e6e695d785d319cb52a8a8ead2982eac2afa.zip Doxygen-2277e6e695d785d319cb52a8a8ead2982eac2afa.tar.gz Doxygen-2277e6e695d785d319cb52a8a8ead2982eac2afa.tar.bz2 |
Doxywizard: make the Next button on the last page of the expert tab switch to the run tab
-rw-r--r-- | addon/doxywizard/doxywizard.cpp | 2 | ||||
-rw-r--r-- | addon/doxywizard/expert.cpp | 22 | ||||
-rw-r--r-- | addon/doxywizard/expert.h | 2 |
3 files changed, 21 insertions, 5 deletions
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index d69cf73..26df065 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -128,6 +128,7 @@ MainWindow::MainWindow() 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(); @@ -372,6 +373,7 @@ void MainWindow::saveSettings() void MainWindow::selectTab(int id) { if (id==0) m_wizard->refresh(); + else if (id==1) m_expert->refresh(); } void MainWindow::selectRunTab() 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 &); |