[longomatch] Add the teams tagger in the coding widget
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add the teams tagger in the coding widget
- Date: Mon, 7 Jul 2014 11:26:12 +0000 (UTC)
commit 7fbe907ef30900b1f7cabf41f627c9d65a472330
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu May 29 21:08:04 2014 +0200
Add the teams tagger in the coding widget
LongoMatch.GUI/Gui/Component/CodingWidget.cs | 13 +++++++++++++
.../LongoMatch.Gui.Component.CodingWidget.cs | 19 +++++++++++++------
LongoMatch.GUI/gtk-gui/gui.stetic | 13 +++++++++++--
3 files changed, 37 insertions(+), 8 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index e9207f3..7967ff7 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -20,6 +20,8 @@ using LongoMatch.Handlers;
using LongoMatch.Store;
using LongoMatch.Common;
using System.Collections.Generic;
+using LongoMatch.Drawing.Widgets;
+using LongoMatch.Drawing.Cairo;
namespace LongoMatch.Gui.Component
{
@@ -28,6 +30,7 @@ namespace LongoMatch.Gui.Component
{
AnalysisComponent parent;
VideoAnalysisMode analysisMode;
+ TeamTagger teamtagger;
Project project;
public CodingWidget ()
@@ -48,6 +51,13 @@ namespace LongoMatch.Gui.Component
autoTaggingMode.Toggled += HandleViewToggled;
autoTaggingMode.Active = true;
+
+ teamtagger = new TeamTagger (new WidgetWrapper (drawingarea1));
+ teamtagger.HomeColor = Constants.HOME_COLOR;
+ teamtagger.AwayColor = Constants.AWAY_COLOR;
+
+ drawingarea1.HeightRequest = 200;
+ drawingarea1.WidthRequest = 300;
}
public void SetProject (Project project, bool isLive, PlaysFilter filter,
@@ -58,6 +68,8 @@ namespace LongoMatch.Gui.Component
timeline.Visible = false;
buttonswidget.Visible = true;
buttonswidget.Project = project;
+ teamtagger.LoadTeams (project.LocalTeamTemplate, project.VisitorTeamTemplate,
+ project.Categories.FieldBackground);
timeline.SetProject (project, filter);
}
@@ -94,6 +106,7 @@ namespace LongoMatch.Gui.Component
set {
buttonswidget.Visible = (value == VideoAnalysisMode.ManualTagging) ||
(value == VideoAnalysisMode.PredefinedTagging);
+ drawingarea1.Visible = buttonswidget.Visible;
timeline.Visible = value == VideoAnalysisMode.Timeline;
if(value == VideoAnalysisMode.ManualTagging)
buttonswidget.Mode = TagMode.Free;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
index 9f53d82..d2365a9 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
@@ -12,6 +12,7 @@ namespace LongoMatch.Gui.Component
private global::Gtk.HBox hbox1;
private global::Gtk.Toolbar codingtoolbar;
private global::Gtk.HBox hbox2;
+ private global::Gtk.DrawingArea drawingarea1;
private global::LongoMatch.Gui.Component.ButtonsWidget buttonswidget;
private global::LongoMatch.Gui.Component.Timeline timeline;
@@ -62,22 +63,28 @@ namespace LongoMatch.Gui.Component
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
+ this.drawingarea1 = new global::Gtk.DrawingArea ();
+ this.drawingarea1.Name = "drawingarea1";
+ this.hbox2.Add (this.drawingarea1);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.drawingarea1]));
+ w6.Position = 0;
+ // Container child hbox2.Gtk.Box+BoxChild
this.buttonswidget = new global::LongoMatch.Gui.Component.ButtonsWidget ();
this.buttonswidget.Events = ((global::Gdk.EventMask)(256));
this.buttonswidget.Name = "buttonswidget";
this.hbox2.Add (this.buttonswidget);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.buttonswidget]));
- w6.Position = 0;
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.buttonswidget]));
+ w7.Position = 1;
// Container child hbox2.Gtk.Box+BoxChild
this.timeline = new global::LongoMatch.Gui.Component.Timeline ();
this.timeline.Events = ((global::Gdk.EventMask)(256));
this.timeline.Name = "timeline";
this.hbox2.Add (this.timeline);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.timeline]));
- w7.Position = 1;
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.timeline]));
+ w8.Position = 2;
this.vbox2.Add (this.hbox2);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
- w8.Position = 1;
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
+ w9.Position = 1;
this.Add (this.vbox2);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 524a196..b5bc248 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -10354,12 +10354,21 @@ Click 2 players to swap them</property>
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
+ <widget class="Gtk.DrawingArea" id="drawingarea1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
<widget class="LongoMatch.Gui.Component.ButtonsWidget" id="buttonswidget">
<property name="MemberName" />
<property name="Events">ButtonPressMask</property>
</widget>
<packing>
- <property name="Position">0</property>
+ <property name="Position">1</property>
<property name="AutoSize">True</property>
</packing>
</child>
@@ -10369,7 +10378,7 @@ Click 2 players to swap them</property>
<property name="Events">ButtonPressMask</property>
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">2</property>
<property name="AutoSize">True</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]