<Template>
  <SetVariable name="group">[Channel<Variable name="channum"/>]</SetVariable>
  <WidgetGroup>
    <ObjectName>MixerChannel_4Decks</ObjectName>
    <Layout>vertical</Layout>
    <SizePolicy>min,min</SizePolicy>
    <Children>

      <WidgetGroup>
        <Size>0min,0me</Size>
      </WidgetGroup>

      <WidgetGroup>
        <Layout>horizontal</Layout>
        <SizePolicy>min,max</SizePolicy>
        <Children>
          <WidgetGroup>
            <Layout>vertical</Layout>
            <Children>
              <Template src="skin:button_2state.xml">
                <SetVariable name="TooltipId">pfl</SetVariable>
                <SetVariable name="icon">pfl</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,pfl</SetVariable>
                <SetVariable name="Size">26,26</SetVariable>
              </Template>

              <!-- Spacer to put the PFL button a little bit higher -->
              <WidgetGroup>
                <Layout>vertical</Layout>
                <Size>1min,8f</Size>
                <Children/>
              </WidgetGroup>
            </Children>
          </WidgetGroup>
          <Template src="skin:knob.xml">
            <SetVariable name="Size">40f,34f</SetVariable>
            <SetVariable name="group"><Variable name="group"/></SetVariable>
            <SetVariable name="control">pregain</SetVariable>
            <SetVariable name="label">gain</SetVariable>
            <SetVariable name="TooltipId">pregain</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>

      <Template src="skin:eq_knob_4decks.xml">
        <SetVariable name="FxParameter">4</SetVariable>
      </Template>

      <Template src="skin:eq_knob_4decks.xml">
        <SetVariable name="FxParameter">3</SetVariable>
      </Template>

      <Template src="skin:eq_knob_4decks.xml">
        <SetVariable name="FxParameter">2</SetVariable>
      </Template>

      <Template src="skin:eq_knob_4decks.xml">
        <SetVariable name="FxParameter">1</SetVariable>
      </Template>

      <Template src="skin:quick_effect_knob_4decks.xml"/>

      <WidgetGroup>
        <ObjectName>CrossfaderSwitch4Decks</ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Template src="skin:button_3state.xml">
            <SetVariable name="TooltipId">orientation</SetVariable>
            <SetVariable name="Size">34f,15f</SetVariable>
            <SetVariable name="state_0">orientation_deck<Variable name="deckSide"/>_left</SetVariable>
            <SetVariable name="state_1">orientation_deck_master</SetVariable>
            <SetVariable name="state_2">orientation_deck<Variable name="deckSide"/>_right</SetVariable>
            <SetVariable name="ConfigKey"><Variable name="group"/>,orientation</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>

      <!-- Spacer when there's no 4th EQ AND no QuickEffect loaded -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <WidgetGroup>
            <Layout>horizontal</Layout>
            <Size>0min,4f</Size>
            <Children/>
            <Connection>
              <ConfigKey>[QuickEffectRack1_<Variable name="group"/>_Effect1],loaded</ConfigKey>
              <Transform><Not/></Transform>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>
        </Children>
        <Connection>
          <ConfigKey>[EqualizerRack1_<Variable name="group"/>_Effect1],parameter4_loaded</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>

      <WidgetGroup>
        <ObjectName>VuAndSlider4decks</ObjectName>
        <Layout>horizontal</Layout>
        <Children>
          <WidgetGroup>
            <ObjectName>VuMeter4Decks</ObjectName>
            <Layout>vertical</Layout>
            <SizePolicy>min,max</SizePolicy>
            <Size>26,0</Size>
            <Children>
              <StatusLight>
                <TooltipId>channel_PeakIndicator</TooltipId>
                <PathStatusLight>style/clipping_deck_over.png</PathStatusLight>
                <PathBack>style/clipping_deck.png</PathBack>
                <Connection>
                  <ConfigKey><Variable name="group"/>,PeakIndicator</ConfigKey>
                </Connection>
              </StatusLight>
              <VuMeter>
                <TooltipId>channel_VuMeter</TooltipId>
                <PathVu>style/volume_display_deck_over.png</PathVu>
                <PathBack>style/volume_display_deck.png</PathBack>
                <Horizontal>false</Horizontal>
                <PeakHoldSize>5</PeakHoldSize>
                <PeakHoldTime>500</PeakHoldTime>
                <PeakFallTime>50</PeakFallTime>
                <PeakFallStep>2</PeakFallStep>
                <Connection>
                  <ConfigKey><Variable name="group"/>,VuMeter</ConfigKey>
                </Connection>
              </VuMeter>
            </Children>
          </WidgetGroup>

          <SliderComposed>
            <TooltipId>channel_volume</TooltipId>
            <Handle scalemode="STRETCH_ASPECT">knob_volume_deck.svg</Handle>
            <Slider>slider_volume_deck.svg</Slider>
            <Horizontal>false</Horizontal>
            <Connection>
              <ConfigKey><Variable name="group"/>,volume</ConfigKey>
            </Connection>
          </SliderComposed>
        </Children>
      </WidgetGroup>

      <WidgetGroup>
        <Size>0min,0me</Size>
      </WidgetGroup>

    </Children>
  </WidgetGroup>
</Template>
