Rename IWizard::Kind --> IWizard::WizardKind, add some logic for which wizard kinds to collapse/expand.

This commit is contained in:
con
2010-01-14 14:14:39 +01:00
parent d4be77b48f
commit 4a46d0864b
16 changed files with 113 additions and 36 deletions

View File

@@ -56,7 +56,6 @@
#include "statusbarmanager.h"
#include "uniqueidmanager.h"
#include "manhattanstyle.h"
#include "dialogs/iwizard.h"
#include "navigationwidget.h"
#include "rightpane.h"
#include "editormanager/ieditorfactory.h"
@@ -744,7 +743,8 @@ void MainWindow::registerDefaultActions()
void MainWindow::newFile()
{
showNewItemDialog(tr("New...", "Title of dialog"), IWizard::allWizards());
showNewItemDialog(tr("New...", "Title of dialog"), IWizard::allWizards(),
QString(), m_coreImpl->newItemDialogPreferredWizardKinds());
}
void MainWindow::openFile()
@@ -836,7 +836,8 @@ void MainWindow::setFocusToEditor()
QStringList MainWindow::showNewItemDialog(const QString &title,
const QList<IWizard *> &wizards,
const QString &defaultLocation)
const QString &defaultLocation,
IWizard::WizardKinds preferredWizardKinds)
{
// Scan for wizards matching the filter and pick one. Don't show
// dialog if there is only one.
@@ -851,6 +852,7 @@ QStringList MainWindow::showNewItemDialog(const QString &title,
NewDialog dlg(this);
dlg.setWizards(wizards);
dlg.setWindowTitle(title);
dlg.setPreferredWizardKinds(preferredWizardKinds);
wizard = dlg.showDialog();
}
break;