<!--
|
*****************************************************************************
|
**
|
** Copyright (C) 2020 The Qt Company Ltd.
|
** Contact: https://www.qt.io/licensing/
|
**
|
** This file is part of the Qt VS Tools.
|
**
|
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
** Commercial License Usage
|
** Licensees holding valid commercial Qt licenses may use this file in
|
** accordance with the commercial license agreement provided with the
|
** Software or, alternatively, in accordance with the terms contained in
|
** a written agreement between you and The Qt Company. For licensing terms
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
** information use the contact form at https://www.qt.io/contact-us.
|
**
|
** GNU General Public License Usage
|
** Alternatively, this file may be used under the terms of the GNU
|
** General Public License version 3 as published by the Free Software
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
** included in the packaging of this file. Please review the following
|
** information to ensure the GNU General Public License requirements will
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
**
|
** $QT_END_LICENSE$
|
**
|
*****************************************************************************
|
-->
|
<common:WizardPage x:Class="QtVsTools.Wizards.ProjectWizard.ConfigPage"
|
xmlns:common="clr-namespace:QtVsTools.Wizards.Common"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" KeepAlive="True"
|
mc:Ignorable="d" d:DesignHeight="445" d:DesignWidth="585">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="100" />
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
<Image Grid.Column="0" HorizontalAlignment="Center"
|
Source="/QtVsTools.Wizards;component/Resources/Qt-logo-small.png" VerticalAlignment="Top"
|
Margin="0,25,0,0" RenderTransformOrigin="1,0">
|
<Image.RenderTransform>
|
<TransformGroup>
|
<ScaleTransform ScaleY="0.86" ScaleX="0.86" />
|
</TransformGroup>
|
</Image.RenderTransform>
|
</Image>
|
<Grid Grid.Column="1" Margin="25,25,10,0">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
</Grid.RowDefinitions>
|
<TextBlock TextWrapping="Wrap" Grid.Row="0">
|
<Run FontWeight="Bold" Text="{Binding Path=Header}" />
|
<LineBreak />
|
<LineBreak />
|
<Run Text="{Binding Path=Message}" />
|
<LineBreak />
|
</TextBlock>
|
<Grid Grid.Row="1" Name="ModuleGrid">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
<Grid.Resources>
|
<Style TargetType="ListBox">
|
<Setter Property="Background" Value="Transparent" />
|
</Style>
|
</Grid.Resources>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
</Grid.RowDefinitions>
|
<DataGrid Margin="0,20,0,0" Name="ConfigTable" AutoGenerateColumns="False"
|
IsReadOnly="True" BorderThickness="1" BorderBrush="LightGray"
|
GridLinesVisibility="All" HorizontalGridLinesBrush="LightGray"
|
VerticalGridLinesBrush="LightGray" CanUserReorderColumns="False"
|
CanUserSortColumns="False" CanUserResizeRows="False" RowHeaderWidth="0"
|
FrozenColumnCount="1" Grid.Row="0">
|
<DataGrid.Resources>
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
|
</DataGrid.Resources>
|
<DataGrid.CellStyle>
|
<Style TargetType="DataGridCell">
|
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
</Style>
|
</DataGrid.CellStyle>
|
<DataGrid.Columns>
|
<DataGridTemplateColumn Header="Configuration">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Button Cursor="Hand" ButtonBase.Click="RemoveConfig_Click">
|
<Button.Template>
|
<ControlTemplate TargetType="Button">
|
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"
|
Margin="2,0">
|
<Ellipse Fill="Red" Width="13" Height="13" />
|
<Rectangle Width="8" Height="2" Fill="White" />
|
</Grid>
|
</ControlTemplate>
|
</Button.Template>
|
</Button>
|
<Button Cursor="Hand" ButtonBase.Click="DuplicateConfig_Click">
|
<Button.Template>
|
<ControlTemplate TargetType="Button">
|
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"
|
Margin="2,0">
|
<Ellipse Fill="#FF36B31A" Width="13" Height="13" />
|
<Rectangle Width="8" Height="2" Fill="White" />
|
<Rectangle Width="2" Height="8" Fill="White" />
|
</Grid>
|
</ControlTemplate>
|
</Button.Template>
|
</Button>
|
<TextBox Text="{Binding Name}" Margin="2,8" BorderThickness="0"
|
Background="Transparent" TextBoxBase.TextChanged="Name_TextChanged">
|
<TextBox.Resources>
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
|
Color="LimeGreen" />
|
</TextBox.Resources>
|
</TextBox>
|
</StackPanel>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<DataGridTemplateColumn Header="Qt Version">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<ComboBox Text="{Binding QtVersionName}" IsEditable="True" Height="22"
|
SelectedIndex="0" BorderThickness="0" Background="Transparent"
|
FrameworkElement.Loaded="QtVersion_ComboBox_Loaded"
|
TextBoxBase.TextChanged="QtVersion_TextChanged">
|
<ComboBox.Resources>
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
|
Color="LimeGreen" />
|
</ComboBox.Resources>
|
</ComboBox>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<DataGridTemplateColumn Header="Target">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<ComboBox Text="{Binding Target}" IsEditable="True" Height="22"
|
SelectedIndex="0" BorderThickness="0" Background="Transparent"
|
FrameworkElement.Loaded="Target_ComboBox_Loaded"
|
TextBoxBase.TextChanged="Target_TextChanged">
|
<ComboBox.Resources>
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
|
Color="LimeGreen" />
|
</ComboBox.Resources>
|
</ComboBox>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<DataGridTemplateColumn Header="Platform">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<ComboBox Text="{Binding Platform}" IsEditable="True" Height="22"
|
SelectedIndex="0" BorderThickness="0" Background="Transparent"
|
FrameworkElement.Loaded="Platform_ComboBox_Loaded"
|
TextBoxBase.TextChanged="Platform_TextChanged">
|
<ComboBox.Resources>
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
|
Color="LimeGreen" />
|
</ComboBox.Resources>
|
</ComboBox>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<DataGridTemplateColumn Header="Debug">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center"
|
IsChecked="{Binding IsDebug}" Click="Debug_Click" />
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
<DataGridTemplateColumn Header="Qt Modules" Width="*">
|
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
<ComboBox Name="Modules">
|
<ComboBox.Template>
|
<ControlTemplate TargetType="ComboBox">
|
<Grid>
|
<ListView Name="SelectedModules" ItemsSource="{Binding SelectedModules}"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
BorderThickness="0" IsEnabled="False">
|
<ListView.ItemsPanel>
|
<ItemsPanelTemplate>
|
<WrapPanel />
|
</ItemsPanelTemplate>
|
</ListView.ItemsPanel>
|
<ListView.ItemTemplate>
|
<DataTemplate>
|
<Grid>
|
<Rectangle Fill="#FF36B31A" RadiusX="4" RadiusY="4" Height="20" />
|
<Label Content="{Binding Name}" Foreground="White" />
|
</Grid>
|
</DataTemplate>
|
</ListView.ItemTemplate>
|
</ListView>
|
<ToggleButton Opacity="0" Name="ToggleButton" Focusable="false"
|
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
ClickMode="Press" Cursor="Hand" />
|
<Popup Name="Popup" Placement="Bottom"
|
IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True"
|
Focusable="False" PopupAnimation="Slide">
|
<Grid Name="DropDown" SnapsToDevicePixels="True"
|
MinWidth="{TemplateBinding ActualWidth}"
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
<Border x:Name="DropDownBorder" Background="White"
|
BorderThickness="2" BorderBrush="Gray" />
|
<ListView Name="PopupListBox" BorderThickness="0"
|
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
Margin="10,10,10,10" ItemsSource="{Binding AllModules}">
|
<ListView.ItemsPanel>
|
<ItemsPanelTemplate>
|
<WrapPanel Orientation="Vertical" />
|
</ItemsPanelTemplate>
|
</ListView.ItemsPanel>
|
<ListView.ItemTemplate>
|
<DataTemplate>
|
<CheckBox Content="{Binding Name}"
|
IsChecked="{Binding IsSelected}"
|
IsEnabled="{Binding IsEnabled}" VerticalAlignment="Center"
|
VerticalContentAlignment="Center" Click="Module_Click"
|
Margin="4">
|
<CheckBox.ContentTemplate>
|
<DataTemplate>
|
<Grid>
|
<Rectangle Fill="#FF36B31A" RadiusX="4" RadiusY="4"
|
Height="20" />
|
<Label Content="{Binding}" Foreground="White" />
|
</Grid>
|
</DataTemplate>
|
</CheckBox.ContentTemplate>
|
</CheckBox>
|
</DataTemplate>
|
</ListView.ItemTemplate>
|
<ListView.ItemContainerStyle>
|
<Style TargetType="ListViewItem">
|
<Style.Setters>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="ListViewItem">
|
<ContentPresenter
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style.Setters>
|
</Style>
|
</ListView.ItemContainerStyle>
|
</ListView>
|
</Grid>
|
</Popup>
|
</Grid>
|
</ControlTemplate>
|
</ComboBox.Template>
|
</ComboBox>
|
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
</DataGrid.Columns>
|
</DataGrid>
|
<StackPanel Name="ErrorPanel" Orientation="Horizontal" Grid.Row="1" Margin="0,10"
|
Visibility="Hidden">
|
<Image Name="ErrorIcon" Height="16" Width="16" Margin="5,0" />
|
<Label Name="ErrorMsg" Foreground="Red" />
|
</StackPanel>
|
</Grid>
|
</Grid>
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2"
|
Margin="0,0,0,10">
|
<Button Click="OnPreviousButtonClick" Name="PreviousButton"
|
IsEnabled="{Binding Path=PreviousButtonEnabled}" MinWidth="75">< _Previous</Button>
|
<Button MinWidth="75" Name="NextButton" Click="OnNextButtonClick"
|
IsEnabled="{Binding Path=NextButtonEnabled}" Margin="10,0,0,0">_Next ></Button>
|
<Button MinWidth="75" Click="OnFinishButtonClick" Margin="10,0,0,0" IsDefault="True"
|
IsEnabled="{Binding Path=FinishButtonEnabled}" Name="FinishButton"
|
VerticalAlignment="Bottom">_Finish</Button>
|
<Button Click="OnCancelButtonClick" MinWidth="75" Margin="10,0,0,0" Name="CancelButton"
|
IsEnabled="{Binding Path=CancelButtonEnabled}" IsCancel="True">_Cancel</Button>
|
</StackPanel>
|
</Grid>
|
</Grid>
|
</common:WizardPage>
|