summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/coreplugin/basefilewizard.cpp17
-rw-r--r--src/plugins/coreplugin/basefilewizard.h6
-rw-r--r--src/plugins/coreplugin/dialogs/iwizard.h2
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.cpp7
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.ui102
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.cpp5
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.h2
7 files changed, 101 insertions, 40 deletions
diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp
index b04a4ef0fb..125e5b5090 100644
--- a/src/plugins/coreplugin/basefilewizard.cpp
+++ b/src/plugins/coreplugin/basefilewizard.cpp
@@ -88,6 +88,7 @@ public:
QString displayCategory;
Core::FeatureSet requiredFeatures;
Core::IWizard::WizardFlags flags;
+ QString descriptionImage;
};
BaseFileWizardParameterData::BaseFileWizardParameterData(IWizard::WizardKind k) :
@@ -242,6 +243,17 @@ void BaseFileWizardParameters::setFlags(Core::IWizard::WizardFlags flags)
{
m_d->flags = flags;
}
+
+QString BaseFileWizardParameters::descriptionImage() const
+{
+ return m_d->descriptionImage;
+}
+
+void BaseFileWizardParameters::setDescriptionImage(const QString &path)
+{
+ m_d->descriptionImage = path;
+}
+
/*!
\class Core::Internal::WizardEventLoop
\brief Special event loop that runs a QWizard and terminates if the page changes.
@@ -417,6 +429,11 @@ QString BaseFileWizard::displayCategory() const
return d->m_parameters.displayCategory();
}
+QString BaseFileWizard::descriptionImage() const
+{
+ return d->m_parameters.descriptionImage();
+}
+
void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform)
{
QTC_ASSERT(!path.isEmpty(), return);
diff --git a/src/plugins/coreplugin/basefilewizard.h b/src/plugins/coreplugin/basefilewizard.h
index fb07b2da21..64a21259d2 100644
--- a/src/plugins/coreplugin/basefilewizard.h
+++ b/src/plugins/coreplugin/basefilewizard.h
@@ -96,6 +96,10 @@ public:
Core::IWizard::WizardFlags flags() const;
void setFlags(Core::IWizard::WizardFlags flags);
+
+ QString descriptionImage() const;
+ void setDescriptionImage(const QString &path);
+
private:
QSharedDataPointer<BaseFileWizardParameterData> m_d;
};
@@ -150,6 +154,8 @@ public:
virtual QString category() const;
virtual QString displayCategory() const;
+ virtual QString descriptionImage() const;
+
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform);
virtual Core::FeatureSet requiredFeatures() const;
virtual WizardFlags flags() const;
diff --git a/src/plugins/coreplugin/dialogs/iwizard.h b/src/plugins/coreplugin/dialogs/iwizard.h
index b6e0a4e79a..ec26f69650 100644
--- a/src/plugins/coreplugin/dialogs/iwizard.h
+++ b/src/plugins/coreplugin/dialogs/iwizard.h
@@ -72,6 +72,8 @@ public:
virtual QString category() const = 0;
virtual QString displayCategory() const = 0;
+ virtual QString descriptionImage() const = 0;
+
virtual FeatureSet requiredFeatures() const = 0;
virtual WizardFlags flags() const = 0;
diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp
index 4f68818a8e..201c529c9e 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/newdialog.cpp
@@ -436,6 +436,13 @@ void NewDialog::currentItemChanged(const QModelIndex &index)
m_ui->templateDescription->setHtml(desciption);
+ if (!wizard->descriptionImage().isEmpty()) {
+ m_ui->imageLabel->setVisible(true);
+ m_ui->imageLabel->setPixmap(wizard->descriptionImage());
+ } else {
+ m_ui->imageLabel->setVisible(false);
+ }
+
} else {
m_ui->templateDescription->setText(QString());
}
diff --git a/src/plugins/coreplugin/dialogs/newdialog.ui b/src/plugins/coreplugin/dialogs/newdialog.ui
index 536c9f6eb6..5fd1684913 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.ui
+++ b/src/plugins/coreplugin/dialogs/newdialog.ui
@@ -33,42 +33,16 @@
</property>
</widget>
</item>
- <item row="1" column="2">
- <widget class="QTextBrowser" name="templateDescription">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="2" column="1">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QComboBox" name="comboBox"/>
- </item>
- </layout>
- </item>
<item row="1" column="0">
<widget class="QTreeView" name="templateCategoryView">
<property name="sizePolicy">
@@ -170,16 +144,64 @@
</property>
</widget>
</item>
- <item row="2" column="1" colspan="2">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
+ <item row="1" column="2">
+ <widget class="QFrame" name="frame">
+ <property name="styleSheet">
+ <string notr="true">QFrame { background: white }</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="imageLabel">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextBrowser" name="templateDescription">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
+ <item row="0" column="1" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBox"/>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
<resources/>
diff --git a/src/plugins/vcsbase/basecheckoutwizard.cpp b/src/plugins/vcsbase/basecheckoutwizard.cpp
index dfbcf27518..9ef03dcc24 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizard.cpp
@@ -119,6 +119,11 @@ QString BaseCheckoutWizard::id() const
return d->id;
}
+QString BaseCheckoutWizard::descriptionImage() const
+{
+ return QString();
+}
+
void BaseCheckoutWizard::setId(const QString &id)
{
d->id = id;
diff --git a/src/plugins/vcsbase/basecheckoutwizard.h b/src/plugins/vcsbase/basecheckoutwizard.h
index b36bacc576..cf012709c9 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.h
+++ b/src/plugins/vcsbase/basecheckoutwizard.h
@@ -64,6 +64,8 @@ public:
virtual QString displayCategory() const;
virtual QString id() const;
+ virtual QString descriptionImage() const;
+
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform);
virtual Core::FeatureSet requiredFeatures() const;